Project Fire – Enemies on a Planet

Project Fire is an experimental project that looked into a particular aspect of a video game, this being Super Mario Galaxy. In the Game, the player, Mario has to jump from planet to planet to defeat enemies and get stars. The Enemies at question had to follow unique rules due to the environment they were working in.

In the game, the enemies usually walk around and follow non-flat non-up vector surfaces. Non-flat means that the enemies will not be on flat planes and non-up vectors mean that the enemies must move regardless of the world scene up-vector. This can lead to difficult scenarios where certain elements and maths cannot be used to construct the Enemy AI. One example is the character controller and cinemachine, and AI navmesh system in Unity, as they all cannot function properly when the up vector is not constant or not at a default value of (0,1,0).

Therefore, my goal was to produce a small demo that allows playing a character, on a planet and fighting hoards of enemies. This meant that custom gravity was used and using maths related to circles and spheres than the simple vector maths, like circumference.

The AI used for the enemies is the A* node array solution from “AI for games” by Ian Millington. To erase the chances of enemies using other’s path directions, each call made a copy of the planet’s nodes for their own calculation of where to go. This increased the speed of the algorithm while doubling the memory size of the process as a trade-off.

The Enemies and players follow the rules of movement on a sphere. However, the bullets of the gun also do, changing their projectile and rotation to satisfy the conditions of movement.

The Bullets curve with the planet

If the project is picked up again, then it would see the game adding more features and AI abilities into it, like planet-hopping, varied grounds and more enemy types.