Krilling Dev-Log #5

Published February 18, 2024
Advertisement

This week I continued my work on the tutorial. Unfortunately, I had a lot come up this week, so I was unable to get as much done as I would have hoped. The tasks I was able to complete this week were the following:

· Fix a UI scaling issue.

· Add sprites to dialogue.

· Create the ability to do something the first time an object is possessed.

· Create the base functionality to do something the first time the player gets close enough to a victim to scare them.

The UI scaling issue was something I noticed when working with the dialogue box. The dialogue system was originally made in another scene and when I ported it over to our tutorial scene it was wildly out of scale. I discovered it was because the scene it was made in had a normal canvas resolution of 1920x1080, but our game scene for some reason had a resolution of 800x600. This explained a lot of random problems we had with the UI over time. So, I went ahead and changed it to 1920x1080 and then I scaled up the UI assets that were obviously scaled down by the change.

Our UI designer wanted to have pictures of the people speaking, so she asked that I add that functionality in. To do so I added a sprite field to the dialog class and then I added an Image field to the DialogueManager class, for more context on the dialogue system see Here.

DialogueManager adding Image Field
Dialog adding Sprite field

Then when the dialogue is being run as normal, I update the image to the dialog sprite at the same time I update the name of the speaker.

Changing sprite in DIalogueManager

And here is what the result looks like in the game.

Final Dialogue Result

In the tutorial, we wanted to be able to detect when a player first possesses an object to display some information. To do this I had the highlight functionality that already detected when its possessable was possessed for the first time raise an event.

Raising FIrst Time Possessed event

Then I created a FirstTimePossessPopup class that simply listens to this event and displays something.

First TIme Possess Popup class

I am first working on creating the functionality to track these actions and do something on their activation, and then later I will work with our designers to replace the placeholders with what we want to display. At the moment I just spawn a small box around the possessable as a proof of concept.

Final Popup Result

The first time entering scare range is mostly the same as the first time possessing. For the popup I have primarily the same setup, listening to an event and displaying something.

First Time Entering Scare Range Popup class

However, there is one major difference in that there is not already a way to detect when entering scare range. Currently, the collider is enabled when the player presses the button, so there is nothing set up to track that range until the player presses the button. I did not have time to get around solving this issue, but I can talk about my thoughts and plans of how I will approach it. Since this functionality is only needed for the tutorial, there is no need to rewrite our game's functionality to accommodate it. Instead, I will likely create a new object with a collider the same size as the scare range as an easy band-aid fix. It isn’t perfect, but since there is only one instance of this ever being used there is no need to care about making it in a way that meshes with our systems.

That is all for this week. Unfortunately, a slow week, meaning I will have to pick up the slack next week. The things that got in the way of my work are finished now, so next week should be good for a crunch time week. With the deadline approaching the tutorial is the main thing that needs to be completed to be ready for launch, so it's important this is finished.

Previous Entry Krilling Dev-Log #4
Next Entry Krilling Dev-Log #6
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement