Brief (example scenarios the lecturer may give): Space Defender (move a ship, shoot falling asteroids), Fruit Catcher (catch falling fruit in a basket, avoid rotten ones), Maze Runner (reach the exit, avoid guards), Road Crossing (cross lanes of traffic), Treasure Hunt (collect gems in limited time).
Mandatory requirements
- Uses an HTML5
<canvas>and arequestAnimationFramegame loop. - At least one sprite sheet animation (walking, flying or exploding).
- Keyboard control with smooth movement and boundaries.
- Collision detection between at least two kinds of objects.
- Score, lives or timer, game-over screen, and restart.
- Uses functions and anonymous functions/callbacks appropriately; code commented and organised.
- A short
READMEexplaining controls and scenario rules.
Deliverables: project folder (index.html, game.js, images/), a 3-minute demonstration and a viva. Duration: 4 to 6 hours of lab time. Marking: see the criteria table in 7.10.6.