Grim The Gargoyle King


About

As a gargoyle brought to life, embark on a crystal hunt. Charge through the shattered castle and find enough supporters to become king.

Project info

Team Size: 17
Duration: 15 weeks
Engine: BGGE(Custom engine)


Contributions


Player

Implementing animations

One of the things I was in charge of in this project was implementing all the animations in the game. The most complex was definitely the player which had 27 animations.

The animations in our engine are played by giving an object an Animator component and calling a function with a specific animation. To be able to handle all the animations a little easier I moved the animation code to a separate Update function where it picked the animation depending on a lot of conditions.

The player also utilizes animation layers to be able to do multiple animations on different parts of the body. For example the magic attack had to be able to play while you were walking, running and gliding. Meaning the walk animation is playing on only the legs and the magic attack on only the upper body.

Player Mechanics

When implementing mechanics I worked on interactions with other objects, movement and gamefeel.

Magic attack

The magic attack is a way to attack things in the game. You can hurt enemies and destroy chest. It uses PhysX overlap to check for hit detection.

Charge

The charge ability lets you run faster but keeps you at a constant speed only being able to steer left and right. The charge also works like the magic attack hurting enemies and breaking chests.

Glide

The glide ability lets you glide through the air by holding the jump button. When gliding in the air he starts by falling slowly and after a second he plummets to the ground.

Gamefeel

In this project I worked a lot on making the player feel good. This involved a lot of testing and feedback, tweaking the movement and mechanics until they felt nice to use. This also involved a lot of collaboration with the level designers because the player also had to follow the metrics we had decided on.

As polish I suggested we implement a walk animation for the player, because the run animation did not match the player speed when going slower. I matched the walk animation playback speed to the velocity of the player giving this result.


Enemies


All enemy AI were built with behaviour trees.

Chest Mimic

The chest mimic is an enemy that disguises itself as a chest in order to trick the player. When you attack, it will try to run away from you and killing it gives you one health back.

Behaviour

It uses points on the ground to choose where to run to. Their positions are decided by the level designers giving them control over where the mimic moves. Navigation is done with a navmesh.

When it has run a set distance from the player it will wait at that point for a short period before assuming its disguise again.


Flying book

Behaviour

This enemy flies towards the player when he is in view. Then attacking once close enough. After the attack it will return back to its starting point repeating the behaviour.


Bookshelf

Behaviour

The bookshelf first goes into a preparation phase winding up its attack when the player is within range. Then slams down on the player to deal damage.
If its successful it will do a victory dance giving the player time to recover.


Dialogue system

All dialogues are written in json file with a “Name” id for the dialogue, “Text” for the message and “Texture1” and “Texture2” for the textures of the person talking.

When someone has written a dialogue and want to add it to the game, they first need add a tag to a object. The tag is split in two parts, firstly the type of dialogue and secondly a lookup name for what dialogue to use. The type of dialogue can either be “Gargoyle” which will create a little cutsecene with the npc, aka gargoyle in our games case. The second type is “Dialogue” wich will only display the text without doing anything with the player or the camera.

When displaying the dialogue I search a json file for the lookup name, then extracting the dialog text and what two textures to use for the person talking. Example of json above.

Then I simple go through the text at a set speed writing out the message and switching the sprite back and forth between the two textures based on some rules. For example; closed mouth on spaces and commas and randomy open mouth on a letter.

If the message is not complete when you try to close the dialogue it will instead instantly complete the whole message.