“A dark but charming puzzle game about a supercomputer guiding packs of stupid creatures through a deadly test facility”

Genre: Puzzle

Platform: PC

Engine: Godot

Language: GD Script

Duration: 9 weeks

Team: 10 people

Link: Itch.io

M0THER

My main task during this project was the creatures.

  • Their movement.
  • Their interaction with their environment.
  • Their interactions with each other.
  • Their alternate behaviour in the different creature modifications.

Creature behaviour

Creating the movement and behaviour logic for the creatures was a very iterative process. It was particularly hard to figure out the balance of them being extremely dumb, but still predictable, and while being that still feel like they are alive and not a group of robots.

In my first solution i made them continuously walk towards a target direction. If they encountered an obstacle I used a weighted scoring system to calculate the best new direction. Obstacles and directions facing away from the desired direction was given a higher score and the direction got moved back in the priority list. I could exclude traps from the scoring system, and in that way still make the creatures fall into the traps.

That solution resulted in the creatures being too random in their behaviour. 

Instead I ended up doing a raycast looking ahead, if the creature encountered an obstacle it would go into a new state where they check collisions with more rays and selects what direction to turn towards depending on what rays hit. I added a bias, left or right, that could be set either beforehand or in runtime through a behaviour modifier the designers could place in the levels. In that way I could make the creatures feel more alive while still keeping control of their behaviour.

The creatures have many different states depending on what modification is active. But the core state rotation is:

  • Walking state, moves in one direction.
 
  • Rotation state, checks for collisions and decides direction.
 
  • Centering state, checks its sides and offsets itself away or towards the walls depending on what settings is active in that section.
 
  • Idle state, this state has two sub-behaviours. If colliding with another creature and the collided creature is rotated within a specific threshold, it will wait for a set amount of time before trying to go into walking state again. If the other creature’s rotation is outside the rotation threshold it will go into the rotation state instead trying to bypass the collider.

Fast Forward

During development we added the ability to fast forward to speed up testing. We quickly realized that this was a feature we wanted in the game.

During testing we just adjusted the timescale. That did of course speed up everything which is not optimal.

I instead separated specific parts of the code and applied a custom timescale multiplier to those selected functions. That gave us control over what parts of the code got sped up or not.