Practical Assessments

P12D Game Using JavaScript for a Given Scenario

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

  1. Uses an HTML5 <canvas> and a requestAnimationFrame game loop.
  2. At least one sprite sheet animation (walking, flying or exploding).
  3. Keyboard control with smooth movement and boundaries.
  4. Collision detection between at least two kinds of objects.
  5. Score, lives or timer, game-over screen, and restart.
  6. Uses functions and anonymous functions/callbacks appropriately; code commented and organised.
  7. A short README explaining 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.