Portobelly Production Journal #29

27/02/2019

Today I focused on the AI for the villager mushroom. This AI will be used when the mushroom runs and jumps away from the player.

Fig 1 - Villager running away from Belly

Fig 2 - Villager runaway behaviour tree

Fig 3 - Construction script allow the user to change the size of the trigger sphere

The sphere radius activates the mushrooms retreat action when the player enters the radius. This sphere radius can be changed from the editor which allows the user to adjust the distance the player has to be from the mushroom in order to activate the retreat state.

Fig 4 - Changes to the villagers acceleration

I wanted to make the mushroom run faster than the player so that Belly was unable to catch up with mushroom. I decreased the acceleration of the mushroom so that the villager would gradually run away from the player rather than reaching full speed instantly.

Fig 5 - Villager walking into a jump volume

When the mushroom villager overlaps with the jump volume the villager is forced to jump. The jump volume allows the user to choose an end point for the villager to jump. The villager is launched in an arc from the start point (the initial overlap point) to the desired end point.

Fig 6 - Villager run and jump behaviour tree

Fig 7 - Villager unable to jump across the gorge due to navigation mesh constraints

Due to the limitations of the navigation mesh, the villager was unable to jump over the gap. I managed to solve this by increasing the size of the navigation mesh.

Fig 8 - Villager jump task

Fig 9 - Villager successfully jumping across the bounce pads

Fig 10 - Bounce dampening puddle with adjustable size controls

The puddle volume decreases the bounce height of the player. We needed to implement this puddle after the jump down the cave so that the player did not perform an extremely high bounce. This puddle can be used in over areas where the player jumps from a high height.

I created a vector variable that is exposed within the editor on the puddle volume so that the user can customise the size of the puddle easily. When designing levels, this should make implementing these volumes easy to adjust.

Fig 11 - Puddle viewport

Fig 12 - Scaling the box using the construction script

Fig 13 - Overlap events for the puddle

When creating the logic for the puddle, rather than doing the logic within the character blueprint I wanted to contain the functionality within the puddle blueprint. When the player overlaps with the puddle volume the bounce dampening is applied and when the player leaves the volume the bounce dampening is reset.

Fig 14 - Belly jumping in the bounce dampening puddle

Fig 15 - Belly at full size is unable to get through the cave

When play testing the game I discovered that Belly was unable to get through the cave entrance at full size. I only recently discovered this as when testing the level I spend most of my time at Belly’s smallest size due to the speed increase at the smallest size. This issue was fixed fairly quickly after it’s discovery.

 

Figures List

  1. Rees, O (2019). Villager running away from Belly. [offline]. [Accessed 04/03/2019].

  2. Rees, O (2019). Villager runaway behaviour tree. [offline]. [Accessed 04/03/2019].

  3. Rees, O (2019). Construction script allow the user to change the size of the trigger sphere. [offline]. [Accessed 04/03/2019].

  4. Rees, O (2019). Changes to the villagers acceleration. [offline]. [Accessed 04/03/2019].

  5. Rees, O (2019). Villager walking into a jump volume. [offline]. [Accessed 04/03/2019].

  6. Rees, O (2019). Villager run and jump behaviour tree. [offline]. [Accessed 04/03/2019].

  7. Rees, O (2019). Villager unable to jump across the gorge due to navigation mesh constraints. [offline]. [Accessed 04/03/2019].

  8. Rees, O (2019). Villager jump task. [offline]. [Accessed 04/03/2019].

  9. Rees, O (2019). Villager successfully jumping across the bounce pads. [offline]. [Accessed 04/03/2019].

  10. Rees, O (2019). Bounce dampening puddle with adjustable size controls. [offline]. [Accessed 04/03/2019].

  11. Rees, O (2019). Puddle viewport. [offline]. [Accessed 04/03/2019].

  12. Rees, O (2019). Scaling the box using the construction script. [offline]. [Accessed 04/03/2019].

  13. Rees, O (2019). Overlap events for the puddle. [offline]. [Accessed 04/03/2019].

  14. Rees, O (2019). Belly jumping in the bounce dampening puddle. [offline]. [Accessed 04/03/2019].

  15. Rees, O (2019). Belly at full size is unable to get through the cave. [offline]. [Accessed 04/03/2019].