Overview
For this module I have chosen to learn about game framework and logic. I developed a snake grow game that will move continuously across the screen. The user will use the arrow keys to change the snake’s direction and collect items. Each item collected will cause the snake to grow and increase the score by one. The game will end if the snake touches any side of the screen or collides with its own body. There are also noise notifications with each item collected and an end of game tune.
To play the game the user: Use the arrow keys to direct the snake around the screen. Try to collect the items that are randomly generated each time. Avoid running into the walls or colliding with its own body. The game ends when a collision is detected.
By implementing this game, I learned game mechanics of sprite movements, collision detection, score tracking, sound effects, and managing the dynamically growing list of objects on the snake head. This project helped me learn how to use the software Arcade CodeMaker and to understand how systems update their states on timed intervals. This also helped me learn how the structures of interactive games and logic function.
Development Environment
The development of this game required Microsoft MakeCode Arcade. This software used puzzle pieces to build the statements for a 2D game. Arcade uses 2D sprite, controller input management, collision detection, and audio which allowed me to study the game logic. Programming language: Python Arcade libraries: sprite creation and management, controller input handling, timed update loops, collision detection, score tracking, and sound effects.
Useful Websites
Future Work
- Item 1: Make a start screen
- Item 2: Make a restart option
- Item 3: Create multiple levels by speeding the snake up as score increases
- Item 4: Create multiple levels by implementing obstacles as snake grows
- Item 5: Prevent food from spawning inside snake body