-
Notifications
You must be signed in to change notification settings - Fork 7
Ship Eater
The Ship Eater is a hostile mob that attacks the player's ship instead of the player themselves. They are immune to melee damage as they dig into the ground when the player comes near, meaning they can only be defeated using ranged weapons. They also dig under obstacles, as they must reach the ship at all costs!
Completing the ship repair without any real hazards wouldn't be fun for the player. Thus, the ship eater was brought to life as a way of decreasing progress but without being overly frustrating. Plus, they look adorable!
The ship eater has a chance to spawn upon digging up ship debris. However, they spawning is also locked until the player has completed the Aliens Attack Quest which gives the player a gun as a reward. This is to prevent the ship eaters from spawning before the player has any means of killing them.
The sprite was an original design by Team 2, brought to life late at night with little brain power left.
The ship eater ended up requiring many different components to make its logic work. An overview is in the UML diagram below.
The ship eaters logic priorities were hiding > eating > digging > moving. This caused many problems in the initial implementation, where the components inherited from base classes such as AttackPatternComponent
or AnimalAnimationController
. There were simply too many race conditions, which either caused the completely wrong behaviour to occur, or the ship eater entity would start glitching between multiple behaviours. Thus, the design was changed to make new classes with no inheritance to accomodate the proper event firing functionality. This was specifically achieved by passing variables into the events to signify state.
Not only was this tested extensively in game by spawning ship eater in various locations (near player, on top of obstacles, etc.), but a full coverage test suite was also written. This included checking the ship eaters only spawn when the player has completed the desired quest.