Today I jumped back into the dialogue system. I started with an in-depth discussion with Gemini about the specific path to showing the dialogue system. The functions were mostly ready, but nothing triggered anything. The rest of my UI is shown and hidden based off the current game state. But the dialogue system requires data (a unique dialogue identifier) to open the correct dialogue, and you can't exactly send data with a state change (at least not the way I currently have it implemented).
Gemini first suggested some changes that didn't align with the way the rest of the UI worked. It was suggesting that the UI manager itself dealt with opening the dialogue system and then changing the state. In the end, I decided to go with a new, simple, function on my game manager. Feed the function a dialogue identifier and it sets a public variable on the game manager that the dialogue system can read and then sets the state accordingly.
The UI manager then listens for the state change and if dialogue system is the new state it opens the screen up! Bear in mind, I used Gemini for the discussion and validation but I did all this coding myself. I build out the functionality with my own fingertips! I did feed the code back into a fresh instance to make sure it would do what I wanted.
And now my dialogue system opens and closes! I actually made some other slight modifications to my game manager. I set it so that the escape key will close more screens than it used to. I did update my debug overlay (temporarily) to test this. I have a button that will load a specific dialogue.
Of course, there's still so much more to do in relation to the dialogue system. But this is a great start.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.