6/6/2020: Saturday, June 6th, 2020
Use Your Voice!
Hey there! I'm Mookal, one of Earthbound Rhapsody's programmers. Today, I'm here to tell you about what goes into the game's textboxes (or dialogue boxes, if you prefer). They may seem basic, but there's a bunch of stuff going on with them under the hood. Let's take a look, shall we?
Here we have a regular textbox, basic and innocent. Even the most basic textbox has lots going on. Before we get into the functional stuff, let's talk about how the textbox gets displayed onscreen.
First, some code was written to take the textbox image and cut it into 9 pieces.
This is called a 9 Slice Box.
Now, with the box separated into pieces, we can scale it vertically and horizontally without it losing any quality. Check it out!
Now, we'll return to our initial textbox. There's much more to go over! Before we get too excited, let's look at some stuff that you probably wouldn't notice if I didn't point them out.
First up, line breaks! This is the sort of thing that you only notice when it's done incorrectly, so we wanted to get it right for Rhapsody. The idea is to make sure a word never runs off the side of a textbox.
When a word ends, the game looks ahead in the message to see if the next word will run off the textbox. If it does, then it inserts a line break.
We can also manually insert line breaks by putting "/break/" into the message. These sorts of codes inserted into the message that you don't see ingame are called tags. We can use tags to do even more things, such as...
Pausing! Sometimes when you're talking, you pause to breathe, think, or just because it seems natural to do. We have successfully replicated this phenomena in Earthbound Rhapsody's textboxes! Take a look.
When submitting a message to a textbox, we can write "/pause60/" in a message to insert a pause tag. When the game sees this, the message will pause for however many frames the tag specifies. Here, it's 60 frames, which is a second.
Finally, let's take a look at how the textbox displays who's speaking.
The textbox shows who's talking with a little tab at the top, or the bottom if the textbox is at the top of the screen. To set who's talking, we just insert "/speaker [whoever]/" into the beginning of the message when we send it to the textbox.
When the code that displays the text sees this, the speaker gets set to whoever the tag demands. Because of how versatile this system is, we can even change the speaker mid-sentence! Not sure why we'd need to do that, though...
Well, that sure was fun! I hope you enjoyed learning about Rhapsody's textboxes as much as I enjoyed writing about them. That's it for this blog post! We'll be back in August.
P.S. In celebration of our next blog post being the 10th one, we're making it an AUAA (That's Ask Us Almost Anything)! Look in our Discord Server for the AUAA channel, and send your deepest, darkest Rhapsody-related questions there. Address them to Parzival, address them to the musicians, address them to everyone, whatever you want! We'll answer your questions in the next (10th!!!) blog post, so keep 'em coming.