Week 7: Unity. More Unity.
April 16, 2024
A Short Video Showcase
Kind of took a break from research and stuff due to last week’s fiasco, haha. Mainly spent this week wrangling Unity (again).
Before I get into anything, in celebration of this infuriating website FINALLY supporting media uploads after six whole weeks of nothing, here’s a short showcase video of what’s in the game so far. For the record, 90% of the things you see are placeholder graphics that we are currently using, since Isabelle is still working on the art and designs. The only non-placeholder part of this whole thing is the starting cutscene. The UI and menu are also very barebones for simplicity’s sake right now, and the title is still just a placeholder as well. However, since the basic functionalities are there in the game already, we can just replace the sprites and artwork once Isabelle’s done with them.
Since everything went by rather quickly, I’ll explain a bit of what happens. First off, there’s a cutscene that triggers upon clicking “Begin New Entry” (aka “Start Game”), accompanied by some placeholder text. After that, the game transitions into the main playable area in the game, where many of the main processes can be seen at work.
First, you’ll notice that there’s a Data Store object in the Inspector tab. This is a scriptable object that stores player data, making sure that it retains between scenes. Otherwise, the moment the scene is changed, all the data would be reset. The reason Data Store does not reset in our case is because it is attached to the Game Manager that remains throughout every single scene, and can be seen under the Hierarchy tab. You can see that after the game changes scenes from the main room to the jungle room, the Score value and the Encounters list remain the same.
Upon correctly interacting with the NPC present in the room, Element 0 of the Encounters list in Data Store changes from a value of 0 to 3. This is in order to signify that the player has completed a certain interaction in a certain way, with the index signifying which encounter was completed and the value signifying how the encounter was completed (different choices means different values!). After this interaction, the parts of the game locked behind that specific interaction become available. In this example scenario, those parts are Journal #1 and the barrier preventing the player from accessing the next room. As you can see, after the interaction, Journal #1’s text changes, and the barrier disappears.
Currently, the “Load Game” button does not work, as I have not completed the save / load system and will likely not be doing so for a while since it’s not really a high priority. All text is placeholder text because I’m still working on writing out dialogue and such. We’ve also tried to fix the flashing choices box present in all dialogue, but neither of us could figure the cause so… that’s a problem for future us, I guess.
Progress This Week
With the video out of the way, let’s talk about this week’s progress. I spent most of the week reworking how the journal system works. First off, I added two buttons for flipping pages that can be seen on the bottom parts of the journal. I also specifically created a function that checks if the buttons should appear, and so the buttons will disappear if you cannot flip any more pages in a certain direction just to make things less confusing.
Also, prior to this week, the journal only consisted of two pages, and so journal updates could simply be done by changing the text present on a certain page without any conditions attached. However, in order to support page flipping, I had to change it so that there is a value that checks which page you are on, and as such only updates the text box for a page if the player is on the correct page.
In addition, to avoid saving long journal entries under Data Store, I created a text file that the game reads from in order to collect unlocked journal entries. Basically, each line of the text file represents one journal entry. As such, each line is placed into an array so that the index will correspond with which journal it is. The reason I chose to work with a text file is because if I stored all of the values in an array only, the array would be reset every time a scene changed. Also, I did not want to attach such an array to Data Store, since that would be repetitive due to it already storing the Encounters list. Currently, the text file also consists of placeholder text, but since the system itself works I can simply change the text when I need to.
Up Next Week
Next week, I’ll work on my research again. Since gathering opinions on whether or not a game should have different endings is… rather difficult when the game only has one ending, I will be looking into another game that discusses trauma and moving on, but with multiple endings, like my first two did. Other than that, I will probably also work on writing some dialogue for the actual game, and will probably replace the placeholder cutscene text with what we actually plan to have in the game. I will also see if I can implement using C# methods in Ink, which is what we are using for our dialogue system.
Leave a Reply
You must be logged in to post a comment.