Galactic Reign

A multi-touch Android game sporting a purpose built game engine, collision detection, and 3D renderer.

Contents

Key Points

  • An Android game written in Java and built as a learning experience at university.
  • Features a custom game engine, 3D rendering, collision detection etc.
  • Overcame many technical challenges, but realised the hardest challenge was making the game actually fun.

Features

Whilst never realised into a fully fledged game, this summer project served as a great learning experience and is packed with cool tech (in my opinion).

VideoThe planet is key to the game, so the menu displays it front and centre. Notice that the land mass drifts, and the rings orbit around the planet gracefully.


VideoThe aim of the game is survival. Destroy the rain of asteroids that come your way with various weapons.


VideoThe game features cool animations like this seamless masking interaction with the menu.


The game features various planets, game modes, weapons etc. Weapons include rapid-fire bullets, lasers, and bombs.

The Tech

Game Engine

  • Uses a clean, custom-made game engine. Multi-threading is used to separate CPU intensive tasks such as state updates, rendering, and collision detection.
  • External libraries were not used in order to learn about and implement the engine myself.
  • Collision detection is implemented via spatial partitioning, hit boxes, and bezier curves for more intricate objects.

Asteroids

  • Rendered on-the-fly using bezier curves instead of sprites.
  • Bezier curves allow each asteroid shape to be unique, have custom colours, and to maintain globally lit shadows as they rotate.
  • Bezier curves allow for accurate collision detection after bullets have entered their hit boxes.
  • Animated via simple particle physics to move through the world and interact with other objects.

3D Saturn Rings

  • Purpose built pseudo-3D logic was made to render the Saturn rings.
  • The logic uses the standard 2D drawing library but with masks and transforms that render the rings in 3D space.
  • 3D libraries were not used as to minimise bloat, and because the rings were only a minor part of the graphics.

Lessons Learnt

This was a great project to learn about Android and game development. I was able to execute my vision technically and overcome various challenges on the way.

The hardest challenge, however, was making the game actually fun. I had so much fun making the game, I never stopped to make it enjoyable for others. Definitely a learning moment, and perhaps I will finish the game in future.