I created Snake, using C++ and Allegro 5, as a midterm project for my Game Architecture course at Champlain College. I spent a lot of time hammering down the input mechanics to get the movement to feel as precise as possible. The architecture uses an event queue to keep track of button presses, which makes sure Mr. Snake reacts to speedy key-presses exactly as expected. My version of Snake consists of three levels. The green, orange, and blue animated squares indicate the items in the food, slow-down, and speed-up items respectively.
I have a lot of fun designing and implementing back-end systems, and designing for Snake was no exception.
Over the two-week development period, I worked on many systems including:
- Event Handling
- Level Creation Interpreter
- Scene Management
- Simple Grid Collision Detection
I especially enjoyed creating the level creation interpreter because it allows the game to read in image files and generate levels from them. This feature made adding levels much easier and more intuitive.
Some gameplay mechanics I added include:
- Score Tracking
- Snake Movement
- Item Spawning
If you would like to download Snake and play it for yourself, here is a playable version for Windows computers.