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.
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.
- Open a new window and say hi download source
- Load and display the flyswatter image download source
- Follow the mouse - make it a cursor! download source
- Draw a bug download source
- Make the bug an OBJECT! download source
- React to mouse clicks download source
- Detect if you clicked the bug download source
- Make the click area bigger download source
- Move the bug download source
- Make more than one bug. Make a swarm! download source
- Randomize! download source
- Destroy those bugs download source
- Keep flies from flying off screen download source
- Game over download source
- Trajectories and trigonometry download source
- Make motion more fun download source
- More! Add splatters, more bug types, whatever! download source
- Add a particle system for gore, fix broken wall bounce download source
- Use draw offsets to center sprites, finesse collision detection, and fix abrupt angle changes download source