At the beginning of the semester, we rolled a metaphorical snowball down a hill. Now, that snowball is rolling at Mach 3, as we reach the final stretch of the project. That means more grinding and more cool features and updates for me to present to you.
The focus of the past two weeks has been adding most of the storyline into the dialogue tree, building the UI, and tying the main menu and the game together. Here’s a before photo of the dialogue tree, where the nodes were only really used to test out the asset we bought. And here is the after photo:
The orange node is the start node— all it tells the program is that a new conversation starts there. The blue nodes represent different options the player will have to answer a prompt. Finally, the grey nodes represent blank nodes, so they can be anything from an NPC speaking to a player, a line of code to change the background, or a randomization the next event. Basically, something that the user has no choice in, but the program runs for their benefit.
The UI is a work-in-progress. Little conveniences that we consider default, like “Quit” buttons, don’t just magically appear. You have to choose and create the image of the button using a program like Photoshop, and then create a script to be run when the button is clicked. This is what a simple script for a button to quit to the main menu would look like:
The first two lines reference larger scripts that are similar to what you’d think a dictionary would do. It lets Unity know when running the script that the code is using syntax, or words, from those dictionaries. The three lines, beginning from “SceneManager,” begin by loading up the Main Menu. The Main Menu was built separately, so we first bring it into the screen. In case I run into any errors, the second line leaves the text “i was clicked” in the console to help debug if something goes wrong. The last line deletes whatever you were playing when you clicked the button to leave just the Main Menu. A similar button and script are being used to link the Main Menu and game. Along with these buttons, it’s mainly the design of different items that the user will interact with that is being updated from what came default with the Dialogue Systems Asset.
The game is coming together. Being the programmer on the team gives an interesting perspective. I get to take all these pieces given to me by the other teams and stitch them together. It’s a lot of work, but it’s worth it to be the magic glue that keeps the project together, and we’re almost done!
No responses yet