DivinityCodes

Space Invaders Prototype

A modern reinterpretation of Space Invaders using 3D models displayed in a 2D gameplay space, featuring color linked enemy chain destruction mechanics.

  • Arcade Game
  • Space Invaders
  • 2D Gameplay
  • 3D Assets
  • Chain Reaction
  • Gameplay Mechanics

Goals

The main goal of this project is to recreate Space Invaders with gameplay variation and multiple technical objectives. Each enemy has a specific color. When an enemy of a particular color is destroyed, all connected enemies of the same color are also destroyed.

Space Invaders style grid with colored aliens; a group of connected cyan enemies is highlighted to show chain destruction

Leaderboards

Leaderboards display the top 10 users, sorted by score. The game supports local leaderboard storage but can be easily adapted for server-based storage. All leaderboard operations are asynchronous and responsive. Users must obtain a valid Auth Token from the Auth service before accessing leaderboards.

Services contracts

API contract details cover authentication (token issuance and validation), leaderboard read/write endpoints, error shapes, and versioning so the in-game RestClient layer can swap between local persistence and a remote backend without rewriting gameplay code.

Game flow

The player begins at the main menu, then plays a session. The player can submit their score to the leaderboard if it exceeds any existing scores. The game returns to the main menu after the end of each session.

Discussion points

  • Architecture: The game uses a custom architecture designed to minimize reliance on MonoBehaviour.
  • Game states: The game uses a state machine for transitions.
  • Code flow: A single MonoBehaviour manages game flow.
  • Game systems: These create and manage game entities.
  • Game views: These represent in-game actors.
  • Game settings & parameters: All settings and system configurations are stored in ScriptableObject assets.
  • Services contract: A local leaderboard system with RestClient utility for handling database requests.
  • Helper systems: A variety of supporting systems to manage game mechanics.