Pixel Arts Camp 2013

Teaching Game Development in Lua

In summer of 2013, I volunteered at the Pixel Arts camp in Portland, Oregon, a weekend camp teaching kids about game development. I used Lua and the opensource LÖVE game library to teach a very simple game where you swat flies. Most students had no programming experience whatsoever. I broke down developing a game into atomic steps, and I used each step to teach a concept. Those who were up for it were encouraged to forge ahead, explore the engine and code, and take the game in their own direction. The remainder of the class followed along as we coded these steps together. A large team of additional volunteer mentors was instrumental in assisting every student to their comprehension level. The unit was developed in an afternoon and taught in an afternoon. Also, please pardon the programmer art.

A screenshot Download the final game: Windows Standalone (.zip) Löve package (.love)

Roadmap: Making A Fly Swatting Game

Each step here contains a version of the code at that phase of development. These were provided to students so they could look ahead, or get back to a stable state easily if anything goes awry.

  1. Open a new window and say hi download source
  2. Load and display the flyswatter image download source
  3. Follow the mouse - make it a cursor! download source
  4. Draw a bug download source
  5. Make the bug an OBJECT! download source
  6. React to mouse clicks download source
  7. Detect if you clicked the bug download source
  8. Make the click area bigger download source
  9. Move the bug download source
  10. Make more than one bug. Make a swarm! download source
  11. Randomize! download source
  12. Destroy those bugs download source
  13. Keep flies from flying off screen download source
  14. Game over download source
  15. Trajectories and trigonometry download source
  16. Make motion more fun download source
  17. More! Add splatters, more bug types, whatever! download source
  18. Add a particle system for gore, fix broken wall bounce download source
  19. Use draw offsets to center sprites, finesse collision detection, and fix abrupt angle changes download source