Back to Web Dev For Beginners

Explore Collisions

6-space-game/4-collision-detection/assignment.md

latest2.7 KB
Original Source

Explore Collisions

Instructions

Apply your collision detection knowledge by creating a custom mini-game that demonstrates different types of object interactions. This assignment will help you understand collision mechanics through creative implementation and experimentation.

Project requirements

Create a small interactive game featuring:

  • Multiple moving objects that can be controlled via keyboard or mouse input
  • Collision detection system using rectangle intersection principles from the lesson
  • Visual feedback when collisions occur (object destruction, color changes, effects)
  • Game rules that make collisions meaningful and engaging

Creative suggestions

Consider implementing one of these scenarios:

  • Asteroid field: Navigate a ship through dangerous space debris
  • Bumper cars: Create a physics-based collision arena
  • Meteor defense: Protect Earth from incoming space rocks
  • Collection game: Gather items while avoiding obstacles
  • Territory control: Competing objects trying to claim space

Technical implementation

Your solution should demonstrate:

  • Proper use of rectangle-based collision detection
  • Event-driven programming for user input
  • Object lifecycle management (creation and destruction)
  • Clean code organization with appropriate class structure

Bonus challenges

Enhance your game with additional features:

  • Particle effects when collisions occur
  • Sound effects for different collision types
  • Scoring system based on collision outcomes
  • Multiple collision types with different behaviors
  • Progressive difficulty that increases over time

Rubric

CriteriaExemplaryAdequateNeeds Improvement
Collision DetectionImplements accurate rectangle-based collision detection with multiple object types and sophisticated interaction rulesBasic collision detection works correctly with simple object interactionsCollision detection has issues or doesn't work consistently
Code QualityClean, well-organized code with proper class structure, meaningful variable names, and appropriate commentsCode works but could be better organized or documentedCode is difficult to understand or poorly structured
User InteractionResponsive controls with smooth gameplay, clear visual feedback, and engaging mechanicsBasic controls work with adequate feedbackControls are unresponsive or confusing
CreativityOriginal concept with unique features, visual polish, and innovative collision behaviorsStandard implementation with some creative elementsBasic functionality without creative enhancements