Abstract. Various aspects of computational thinking (CT) could be supported by educational contexts such as simulations and video-games construction. In this field study, potential differences in student motivation and learning were empirically examined through students’ code. For this purpose, we performed a teaching intervention that took place over five weeks, with two-hour sessions per week, plus two more weeks for the pretest and post-test projects. Students were taught programming concepts through a science project; one group represented the function of a basic electric circuit by creating a simulation, while the other group represented the same function by creating a video game in which a player should achieve a score in order to win. Video game construction resulted in projects with higher CT skills and more primitives, as measured through projects’ code analysis. Moreover, the video-game context seems to better motivate students for future engagement with computing activities.