Those Left Behind V2 Pt. 3


This is day 2 of week 12

Yesterday, I made a huge booboo towards the end of the night where I caused a merge error in the git, this freaked me out since whenever I tried to open the project in Unity the camp scene was wiped. I searched for a fix everywhere and honestly I think doing so freaked me out even more. I made a new branch from the last push I knew was working and that worked fine, I let me teammates know to not use that broken branch and called it a night.

Camp Menus (again)

Today I was determined to fix it, I’d spent two days now messing with the game objects and their order in the hierarchy to no avail, so I deduced that it had to be an issue with layering. One thing I needed clarifying was the difference between Sorting Layers and Layers, a quick search boiled it down to: Sorting layers are visual – Layers are functional.

I remembered that this problem wasn’t happening in the original, so I went back and took a recording.

I noticed that the background (“environment”) had its own canvas at the bottom of the hierarchy assigned with a sorting layer “background”, the camp visuals also had “camps” as their sorting layer. Essentially, I replicated the differences and low and behold – it worked.

Note: I just realised these screen recordings also recorded my music playing in the background and wordpress wont let me mute them – sorry! At least it was Brockhampton

Potential tasks:

  • have something happen when the launch pad is clicked on
  • change “security” resource name to “arms”.

Testing a Build of the Game

This went super smoothly, everything was scaled properly and looked quite nice!

Issue: gameplay is saved when going from game to main menu back to game (ironically the opposite problem we were having with game to narrative scene and back)

By “jank parts” I’m referring to the existing issues we are still aiming to fix, I believe that most if not all of them can be sorted by hand-in. However, at this point there still hasn’t been an update from Joe on his task.

Fixing Task Panel Overlap

As seen in the earlier posts, there was an issue with task panels overlapping eachother when clicking NPC portraits. I really didn’t want to overcomplicate this by potentially implementing a whole UI manager so I had to update my PanelOpener script.

The easiest way I found to do this was using Unity’s tag system which will make sure only those specific panels are affected, so I don’t have to worry about portrait buttons and other UI elements vanishing into the abyss (this did happen).

Now, when a player clicks a portrait, the script deactivates all other panels (tagged with "TaskPanel") before toggling the clicked panel.

Narrative Scene

Animated Dialogue Text

I wanted to try out a feature where the dialogue is displayed with a typewriter effect. This would make each line of dialogue appear letter by letter instead of all at once. While this isn’t necessary, I thought it would be a nice touch and fairly simple. I was incorrect about the simple part but it was indeed a nice touch. The hardest part was combing through Joe’s long Narrative Manager script to understand what everything does.

I used a coroutine to handle the animation, which updates the text one character at a time with a small delay. I also modified the existing “Continue” button so that if the player clicks while text is still typing, it instantly completes the line instead of skipping to the next one. This keeps the pacing in the player’s control without breaking the flow of the conversation.

Changing Character Expression Depending on Dialogue Line

Gabi, our team’s character artist had been working hard over the last few weeks to produce assets of the character’s different expressions. With the way the code in the Narrative Manager worked, there was no way to switch between different sprites. I wanted to acknowledge her work and I aimed to find a way to do this.

Essentially, I need it so that each dialogue line now stores not just the text, but also an expression type like “happy” or “angry.” Our character data holds a set of portrait sprites for each emotion, and the system swaps them dynamically during conversations.

To make this work, I replaced the string array that held the dialogue lines with a new class called DialogueLine. Each line will now store both the text and an expression, which I set using an enum called ExpressionType. That way, there’s a fixed set of expressions to work with — things like Neutral, Happy, Sad, and so on.

Then, in the CharacterDialogue class, I added sprite fields for each expression type. So each character can now have their own version of any expression. Inside the same class there is a function to return the correct portrait based on the expression attached to the dialogue line.

Finally, I updated the ShowCurrentLine() method so that when a line appears, it checks what expression it’s supposed to have, grabs the matching portrait, and displays it alongside the text. Since the typewriter effect was working, I made sure that still played nicely with the new expression feature.

The Narrative Manager in the inspector

It’s a small change in terms of structure, but it adds a lot of personality, making our characters feel way more alive and appreciates the character artist’s work. Definitely a polish features that pays off visually!


I got way more done than I thought I would today so I’m super happy! Hopefully tomorrow I can take on the save problem with the help of Ross, but either way I’m so ready to go to bed.

Receiving the seal of approval

2 responses

  1. […] Those Left Behind V2 Pt. 3 Development […]

  2. […] Those Left Behind V2 Pt. 3 […]

Leave a Reply

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