Village Scene Polish + Bugfixing

After playtesting the village scene there were a few things we noticed that this post will address:

Altering the floor tiles

As the village is set right by the ocean (As they are a seafaring people). It doesnt make sense for the floor to be rocky and grassy, but sandy instead. So I asked Paula to make another tileset. However, because the village scene is so simple, only two tiles were necessary:

Rito’s Canoe

Rito is the NPC that talks to the villager and explains to the player what to do after the village scene. He also tells the player that his canoe is available whenever Kauri wants to sail to other islands. Therefore, I have to create the functionality for this aswell:

Canoe script

This script needs to be able handle all instances of the player entering the star navigation scene from from the village scene. But, because the fourth island was scrapped, the player only needs to enter the star navigation scene in two instances:

  1. Their first time arriving to the island (goLevel2)
  2. After returning from the level 2 island (goLevel3)

But how is the canoe script able to set these bools? To do this I’ll use the PlayerManager gameobject. Because it is a singleton, it will store the necessary information where it is readily available.

The way to check if the player should be able to go to the star navigation scene is by:

  1. Knowing what star information they have
  2. Knowing if the player has been to level 2

So this information should be stored in the PlayerManager script:

Which can then be accessed by the Canoe script:

To decide:

  1. If the player should be able to go to the star navigation scene
  2. Where the player should be trying to go to in the star navigation scene

However, there are instances where the player shouldn’t be allowed to go to the star navigation scene. Like if they were to enter the canoe’s collider but not pick up all of the star information necessary. If this were to happen the player needs to be notified, hence the OpenCantGoPrompt() method:

This method activates a gameobject (Being the UI popup that tells the player they can’t sail yet) that I can set in the inspector:

Asset implementation

Paula made this canoe asset for this gameobject:

Which I made a script to make the canoe appear as if it were rowing:

And its values I can alter in the inspector:

Final results

Bugfixing

After playtesting I realised that when the player returns from level 2, the village island will respawn the star information and fish hook fragment they have already collected.

To fix this I need the fish hook fragment and star information pages to check if they have already been collected, by checking the PlayerManager script:

Then at the start of the scene, these objects check if they had been collected. Which causes them to destroy themself if they have been

Leave a Reply

Your email address will not be published. Required fields are marked *