Another day another success! This may actually be the last progress I make this month, I'm busy for the next week with a personal thing. Dragoncon is coming to town! I may get some opportunities to work on the game, but for now I'm not gonna worry about it. Instead, let's talk about today's success. . .
I decided to try to do most of the work myself. I still got help from Gemini, but the logic and actual typing of the coding was all me. Today I focused on my talking points, the simple question and answer system I'm implementing for my NPC dialogue. I worked through the whole thing backwards, starting with the end of the conversation. Well, I started by trying to figure out the specific functionality I needed for this whole thing.
I ended up needing 5 separate functions, some of which are still placeholders. I started with figuring out how I was going to pool the buttons. Once I had a general idea of how it would all work together, I started building out my functions, just placeholders at first. Working backwards was important. The first function I completed was the one to return my buttons to the object pool. Just a simple hide and reset of their connections and text and I add it to my array to pull from.
After that I had to think about my pre-requisites for talking points. Right now there aren't any, but there could be, so I had to plan ahead. Another placeholder! Always returns true. . . for now. I'll get there, lol! After that, I needed to actually build my button picking function. This is the actual pool coding itself. It was surprisingly simple code too. It checks my pool and if it's not empty it just pops an element and returns it, otherwise it makes a new button and returns that instead.
Finally came time to actually populate the talking point buttons themselves. This one just iterates through the talking points in the list, runs the pre-requisite check if there are any, and all valid talking points are given a button and assigned an ID to use. I did have some issues with this part, but most of that was because I dumb. First I totally forgot to child my instantiated buttons. Then I was childing them to the wrong thing. After that, I was totally forgetting to reset my active buttons when closing the dialogue system.
But now, that's all in the past, and everything is great! Still a TON of work to do surrounding this (and everything else) but this is just another step in the right direction. Pretty sure, at this point, I'm ready to start applying actual polish to the game. There will still be a lot of actual coding and stuff to do, but the basic internal systems required to actually build my game exist. They don't all work or do everything they're supposed to yet. But the main systems all exist. The only one I still really need to work on is going to be my inventory viewer.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.