3:34am - Workin' from my bedroom again. I'm still not feeling right working here, but I don't want to go driving all across town to spend money on food so I'll have someplace else to work.
Anyways the next thing I need to do is progress to the next line of dialogue on a button press. Or maybe I should write up the branch code now? No, I'll modify the progresssion code after.
4:20am - Alright! The text boxes are progressing one to the next and then at the end it closes the text box and switches back to the previous game state.
Now I just need to put in the code for displaying the choices and switching between them.
Also, it occurs to me now that I probably shouldn't be destroying and reinstantiating the text box every time I do this, I should be disabling it or moving it off screen or something. The reason I'm destroying them is that I figured later on I might want an animation for when the text box appears. But I can do that just as easily with a permenant textbox that gets hidden. I also thought I might want to be able to make multiple text boxes across the screen, and not just at the bottom, but that's pretty far down the pipe.
So, the reason I shouldn't be destoying and reinstantiating the text box is largely a matter of efficiency. I'm using some complex code to get the text element of the text field of the text box every time it's instantiated, and if I only used one text box I could just store that once and not have to call it again and again. Well, that's something to remember for when I'm tweaking for performance.
Now for the option selection. First I need to display the options if there's more than one.
5:27am - The basic dialogue system demo is fully functional! I can't make it any better without integrating it into an actual game demo. So, I'll hang up my hat for now and let my dude know that I've finished.
Anyways the next thing I need to do is progress to the next line of dialogue on a button press. Or maybe I should write up the branch code now? No, I'll modify the progresssion code after.
4:20am - Alright! The text boxes are progressing one to the next and then at the end it closes the text box and switches back to the previous game state.
Now I just need to put in the code for displaying the choices and switching between them.
Also, it occurs to me now that I probably shouldn't be destroying and reinstantiating the text box every time I do this, I should be disabling it or moving it off screen or something. The reason I'm destroying them is that I figured later on I might want an animation for when the text box appears. But I can do that just as easily with a permenant textbox that gets hidden. I also thought I might want to be able to make multiple text boxes across the screen, and not just at the bottom, but that's pretty far down the pipe.
So, the reason I shouldn't be destoying and reinstantiating the text box is largely a matter of efficiency. I'm using some complex code to get the text element of the text field of the text box every time it's instantiated, and if I only used one text box I could just store that once and not have to call it again and again. Well, that's something to remember for when I'm tweaking for performance.
Now for the option selection. First I need to display the options if there's more than one.
5:27am - The basic dialogue system demo is fully functional! I can't make it any better without integrating it into an actual game demo. So, I'll hang up my hat for now and let my dude know that I've finished.