PurposeThe purpose of this study is to analyze the effects of a game-based learning (GBL) program on the classroom climate and engagement of high schools in socially deprived communities in Spain.MethodsThe study included 277 students from two secondary schools located in Southern Spain, situated in Zones in Need of Social Transformation. Sampling was non-probabilistic and accidental, based on the accessibility of the school and the willingness of the management and teaching staff to participate in the GBL program. The study employed a control group and two experimental groups (cooperative games group only and cooperative and competitive games group) to compare pre-test and post-test data in both groups. The Brief Class Climate Scale and Engagement Inventory, validated in academic literature, were used as assessment instruments.ResultsThe study used a series of ANOVA tests to compare the experimental groups with the control group. The results indicated statistically significant changes in all study variables. In all cases, the experimental groups demonstrated greater benefits than the control group.Discussion and conclusionThe study findings reveal that games can provide significant benefits to students, regardless of whether they are cooperative or competitive. The study provides evidence of the benefits of GBL in high schools located in socially deprived communities in Spain.