Repository navigation
Snake Game pt6
Alvin101210282 edited this page May 2, 2020
·
4 revisions
Welcome to the SnakeGame-pt6 wiki!
The player controls the snake object on a plane. The snake has a fixed length, the body follows the head when the player moves the snake. The snake gains length when it eats food. The game ends when the snake runs into the obstacle.
- Move the snake using arrow keys.
- Avoid colliding with the obstacle "="
- Eat the food "@" using the snake head ">" to gain the snake length "*"
Interface during the gameplay
Interface when player loses
- The program shuts down before displaying the Game Over text along with high score on certain computers. To fix this, a simple readline() was added, so that the program will wait for user input before closing.
- When the snake approaches the bottom right corner, everything on the screen will start scrolling.
All important changes done to the source code will be documented here.
- Added main menu
- Added difficulty system
- Input output of player name
- Read and update the score history
- Fix bugs on scoreboard
- Scoreboard at the top of the program, when the program starts running
- Winning requirement of the game; to achieve a snake length of 15
- Records the score of the user in a plain text file
- Background music with a wav file.
- Food relocation rate had been slowed down to 12000 milliseconds.
- The end game text display in-game was relocated to the middle.
- Pause the screen and only exit after the player presses the Enter key.
- Initial obstacles to spawn randomly.
- Length of the snake to 3 "*".
- Fixed the codes so they follow Borlands Inspired Coding style.
- Grouped the codes that draw the symbols into a function.
- Added more comments to explain each line of code clearer.