The Last Root Standing


Overview:

"The Last Root Standing" is a fun and comedic game developed as part of the Global Game Jam project at Unity Montreal offices. In this root-themed game, the player controls a root that must defend itself against an army of lumberjacks. The game was built using C#, Unity and WebGL.

  • Team of 7
  • Global Game Jam
  • WebGL
  • AI implementation
  • Collision detection
  • Spawn mechanics
  • Physics-based movement

Completion: February 2022

Duration: 48 hours

Platform: Unity 3D


Contribution:

enemy ai

To create dynamic and engaging enemies in our game, I have implemented an AI system using a finite state machine. I defined various states and transitions, such as wandering, attacking, rag-dolling, and screaming, that allow enemies to react to different situations in the game.

physics bases movement

To control the movement of enemies in our game, I used physics-based movement via rigid bodies. Specifically, a force is applied to each enemy's rigid body until it reaches a certain range from its target. To prevent enemies from clustering too closely together, a function calcules a separation force and applies it to each enemy. This ensures that enemies maintain a safe distance from each other and move in a more natural and realistic way.

collision detection

In order to detect collisions in our game, I have set up three rows of colliders on the root, each with a unique tag that identifies what it represents. When a collision occurs, we can use the tag information to determine what action to take. For example, if an enemy collider collides with the root's right or left collider, we can trigger a coroutine that launches the enemy in the air to the good using Unity's physics system. To create a realistic arc, I use a coroutine to gradually decrease the force over time. Additionally, if the enemy collides with the central collider, the enemy is destroyed and then a particle effect is triggered to create a blood splatter that signifies the enemy's death.

spawn mechanics

To handle spawning mechanics in our game, I used the unit circle to randomly spawn enemies at a set distance from their target. The enemies are spawned in waves, with each wave containing a specific number of enemies. As the game progresses, the number of enemies per wave and their spawning speed increases. The difficulty ramps up over time, with more and more enemies spawning until the player is out of lives. All the spawning mechanics are handeled by an enemy manager script.


closing thougths:

"The Last Root Standing" was a thrilling and enjoyable game development experience. Being part of a talented team of seven individuals, we were able to bring this root-themed game to life during the Global Game Jam project at Unity Montreal offices. It was a challenging yet rewarding endeavor that allowed us to showcase our skills and creativity within a tight timeframe of 48 hours.