Here I'm collecting some notes and the code from introducing a group of children to programming by writing a simple game in Haskell. We are using gloss-game, a simple wrapper around the Gloss 2D library, to simplify the code. We are using BigPixel to draw the sprites. (There will be an iPad version of BigPixel soon, too!)
So far, we had three coding sessions:
- Step1: Draw a simple character and move it around.
- Step2: Add gravity and bound character movement by window edges.
- Step3: Add a key binding to jump and let the character bounce when it hits the ground.
- Step4: Properly define constants, such as the window size, and implement continous moving when a movement key keeps being pressed.