2 Jan 2022

Asteroid Resurrected

For this project, we were tasked with reviving a classic retro 2D game using a modern game engine and updated graphics. We chose Asteroids due to its popularity since its 1979 release and its elegantly simple gameplay.

Our team consisted of three programmers and one artist, and we developed the game using the Unity engine.

Overview

Player Controls

I was responsible for designing the spaceship’s flight controls. Since this was my first time creating a spacecraft control system in Unity, I drew significant inspiration from No Man’s Sky, which features an intuitive and easy-to-learn flight model. Unlike Elite Dangerous, which has a highly complex flight system, No Man’s Sky offers a more accessible approach, making it a perfect reference.

The control scheme is simple yet effective:

  • W – Thrust forward
  • A & D – Turn left/right
  • Q & E – Roll left/right
  • Mouse – Control yaw in all four directions

Allowing the mouse to control yaw was essential for creating natural and precise aiming, making combat and navigation feel smoother.

To maintain the spirit of the original Asteroids, the ship gradually slows down when thrust is turned off—despite this not being physically accurate. This design choice preserves the arcade-style gameplay that made the original game so enjoyable.

Shooting Mechanics

We implemented projectile-based shooting, staying true to the original game’s visual style, where bullets travel across the screen rather than hitting instantly.

The ammo system is heat-based, meaning the firing rate decreases when the weapon overheats. This mimics the original game’s mechanics, where players could fire four shots in quick succession before experiencing a brief delay.

To add a touch of modern refinement, I introduced bullet spread, adding slight variance to each shot for a more dynamic and engaging shooting experience.

Asteroid Destruction System

To handle asteroid destruction efficiently, I developed a single scalable script that manages both destruction and the spawning of new asteroids. This system dynamically adjusts asteroid sizes—when a large asteroid is destroyed, it automatically spawns correctly sized smaller fragments.

This approach not only optimizes performance but also ensures a seamless, consistent gameplay experience that faithfully recreates the original game’s mechanics.