Student: tsdedhar Marker: Nalin Chhibber
Total: 71 / 100 (71.00%)
Code: (CO: won’t compile, CR: crashes, FR: UI freezes/unresponsive, NS: not submitted)
Notes:
You are to implement a snake game of your own design with C++ and Xlib, running on an XServer (Windows XMing, macOS XQuartz, or Linux). You should compile and test with g++ 4.9.4 or later (since we will test on the student environment using that version). You are not allowed to use any other third-party libraries.
[5/5] Code compiles and runs (5%).
[0/5] Include a README text file with a description of the game, the controls, the enhancements, the development environment, and anything else that TAs should know when grading.
[4/4] The game should open with a splash screen that includes your name, userid, and a description of how to play the game (including a description of which keys to use).
[8/8] The game screen displays a snake (chain of blocks) always in motion and a fruit (block) at a fixed point on the screen. The snake can move 1 pixel at a time, or one "block" at a time (where a block is a fixed number of pixels), scaled to the speed (parameter).
[4/4] The game must use the arrow keys (and/or WASD) to control the snake's movements. Specify in the README which controls to use.
[8/8] The objective of the snake is to eat the target fruit, which makes it grow in length. As the snake eats the fruit, it disappears, and another fruit appears at a random location.
[4/4] The snake can die by eating itself (when it collides with itself) or by hitting the edge of the screen or any other obstacles. When the snake dies, a game-end screen should appear (below).
[0/4] The game should keep track of a score that updates over the course of the game.
[4/4] The game should have the ability to play, pause, and restart the level.
[4/4] When the game ends, there should be a game-over screen, providing the player with the ability to restart the game, or quit.
[0/10] Enhancements: Up to 10% awarded from this list
Use texture graphics for the background, the snake, and other game objects. (10 marks)
Power-ups (e.g. increase lives, invincibility, etc.) that either appear at a random point on the screen or "fall down" the screen. Be creative with this, an individual power-up is generally worth 5 marks, so implement at least two different power-ups for full marks. (5 marks per power up)
Creative level design. A classic level is a bounded square region with no obstacles inside. You can enhance this by adding obstacles that the snake must avoid and gaps on the border that lets the snake wrap around to other side of the screen.(10 marks)
Support for multiple levels: a level can be "beaten" and the game restarts with a new level, at a higher difficulty. The levels should each be different, and the game must increase in complexity and difficulty as the game progresses. (5 marks)
Multi-player support. Allow two players to play the game simultaneously, each controlling their own snake using distinct controls. Gameplay and animation should remain smooth. (5 marks).