I love sharing what I know and what has proven to work in class with others, which is why since 2018 I've shared with Creative Commons Licence (CC-BY-SA 4.0) teaching materials with other educators.
Students will act a young recruit with the goal of defending their castle from Barbarians' attacks. The more you improve your defenses, the more you have a chance to survive. This can be done by reprogramming the game itself, using javascript. The player is guided in its progress by 3 interactive characters.