Games have been studied for some time as a possible supplement to classroom-based learning and training, yet questions remain about how best to create the content. How can learning and gaming be merged in a way that does not diminish the positive aspects of either? Games that poorly integrate the educational component suffer for failing to teach, and games that poorly design the entertainment component suffer because they fail to engage the student. The content, and its comprehension by students, must then be evaluated to determine whether learning actually occurred. This paper describes the design, implementation, and evaluation of a game – the Mars Game prototype – that has been crafted from the beginning with the intent of emphasizing the educational content and the player’s engagement (i.e. the “fun�) in equal measure. The game teaches 9th and 10th grade math and programming concepts, and aligns to the Common Core State Standards for Mathematics. The results of a randomized control study performed with students from a U.S. high school are provided. The study evaluated the effect of the Mars Game prototype on students learning and engagement. The study demonstrated that the game statistically significantly improved learning outcomes against a comparison group. The study also showed that the treatment group scored significantly higher than the control group on engagement and deep immersion in the gameplay. These evaluations provide encouraging results reinforcing the design goals set out for the game as well as the efficacy of game-based learning – when you have a truly engaging game.