Skip to content

Ship Eater

liv edited this page Oct 17, 2023 · 2 revisions

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!

Contribution to Game & Studio

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!

Spawning

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.

Design

The sprite was an original design by Team 2, brought to life late at night with little brain power left.

shipeater

Programming Choices

The ship eater ended up requiring many different components to make its logic work. An overview is in the UML diagram below. image

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.

Testing

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.

Clone this wiki locally