Text and Text box

Post Reply
User avatar
SeaFoodAndButter
Posts: 90
Joined: Tue Jul 31, 2018 8:54 pm

Text and Text box

Post by SeaFoodAndButter » Sun Aug 26, 2018 10:52 am

Ive followed the Adventure tutorial up to the NPC text part.
The issue I'm having is my text does not stay in my text box, it wraps around the screen.
I had to keep going into my actual text and manually shorten every line (by pressing return to drop the text to the next line) so that the words wouldn't appear outside the box and wrap around the screen.
Doesn't NESMaker automatically fit your text into the text box you set up in the HUD section? Do I have to manually test EVERY line of text in my game to make sure it fits in my text box?

Also, once I close the text box in game, it messes up the color palettes of the graphic assets/paths it appears over. For example, it appears over a graphic that has brown, but once the dialogue is done and the text box closes, the blue color from the dialogue text changes my dirt path to blue. I have to walk to the next screen and then come back for it to go back to normal. And the graphics on my door in the corner disapear. Basically, the text box and text are wonky.

(And I can walk through my NPC as if he's a ghost! This is really silly looking.)

I'll take screen shots soon.
Thanks for any help, I'm a rookie at this!
User avatar
MistSonata
Posts: 231
Joined: Fri Feb 16, 2018 7:10 am

Re: Text and Text box

Post by MistSonata » Sun Aug 26, 2018 5:01 pm

You could write code that does the word wrap for you if you really want that, but the problem is that sort of thing takes up rom space. It's far more economical to just remember how many characters you can have per line (all the characters are the same size, so you don't have to test each line to know whether or not a line would fit in the box). Although, in the NESmaker tool itself, it'd be cool if it could calculate how much space you have in the text box you set in the HUD and highlight any text that extends past that.

As for walking through your NPCs, it was mentioned in another thread, but object collision detection is already being used to trigger NPC text. You would need to make a workaround to have both.
User avatar
SeaFoodAndButter
Posts: 90
Joined: Tue Jul 31, 2018 8:54 pm

Re: Text and Text box

Post by SeaFoodAndButter » Sun Aug 26, 2018 6:53 pm

MistSonata wrote:
Sun Aug 26, 2018 5:01 pm
You could write code that does the word wrap for you if you really want that, but the problem is that sort of thing takes up rom space. It's far more economical to just remember how many characters you can have per line (all the characters are the same size, so you don't have to test each line to know whether or not a line would fit in the box). Although, in the NESmaker tool itself, it'd be cool if it could calculate how much space you have in the text box you set in the HUD and highlight any text that extends past that.

As for walking through your NPCs, it was mentioned in another thread, but object collision detection is already being used to trigger NPC text. You would need to make a workaround to have both.
So, we have to make sure our text fits in the box ourselves? Ok, well now I know.

Here's a vid of the other problems I am having.
https://www.youtube.com/watch?v=6TlAboA ... e=youtu.be

PS When I get the sword from my NPC and the graphic goes in my HUD, I realized it is part of my main character animation. So, I looked at the graphics that come with the Adventure Module and realized that the sword needs to be in a specific place on my GameObject tileset. DO you know how to change this location so I can draw a weapon in my own GameObject tileset without having to use the Adventure Module's character tiles set? I already set up the animation for my own character and I don't want to have to move it around. THANKS!
Thanks for any help, I'm a rookie at this!
Bucket Mouse
Posts: 180
Joined: Wed Mar 07, 2018 2:25 am

Re: Text and Text box

Post by Bucket Mouse » Sun Aug 26, 2018 6:54 pm

SeaFoodAndButter wrote:
Sun Aug 26, 2018 10:52 am
Doesn't NESMaker automatically fit your text into the text box you set up in the HUD section?
No, it doesn't. If you recall, you had to manually tell it the X and Y coordinates.
Hitting Return isn't that big a deal. It's the 256 character limit that can be a problem (but I'm working on it, see the Code section).

Bypass the color glitch for now by repositioning the text box one block over on the right. They're aware of it.
User avatar
SeaFoodAndButter
Posts: 90
Joined: Tue Jul 31, 2018 8:54 pm

Re: Text and Text box

Post by SeaFoodAndButter » Sun Aug 26, 2018 8:47 pm

Bucket Mouse wrote:
Sun Aug 26, 2018 6:54 pm
SeaFoodAndButter wrote:
Sun Aug 26, 2018 10:52 am
Doesn't NESMaker automatically fit your text into the text box you set up in the HUD section?
No, it doesn't. If you recall, you had to manually tell it the X and Y coordinates.
Hitting Return isn't that big a deal. It's the 256 character limit that can be a problem (but I'm working on it, see the Code section).

Bypass the color glitch for now by repositioning the text box one block over on the right. They're aware of it.
I've been getting all kinds of wonky stuff that is due to the text. I moved my text box over to the right like you said, which did make the color issue go away, but graphics were still disappearing. Now, my HUD is adding an extra E on the word NONE when my text starts (the word NONE in my HUD turns to NONEE as soon as my dialogue text starts and doesn't correct until I go one screen over), and when I run a few screens over, ALL my graphics disappear and all my screens turn to only 1s and 0s.

I don't like the look of my text box touching the edge of my screen so I fumbled around with it and found that if I made it 6 tall and 8 wide this took care of the color issues. I also noticed that the text was messing up the graphics for all my doors in the game that were set to be a "locked door" type tile. So I tested by changing all the doors in my game to "solid" and this fixed the problem. But the word NONE in my HUD still changes to NONEE as soon as I start a dialogue with my NPC and won't correct until I leave the screen. I remember Joe said something about the fact there may be some "looping" mistake in the code. But I don't know how to fix this.

The text box area and dialogue/text need real fixing. I shouldn't have to make my locked doors "solid" just to get my text to work and my HUD shouldn't be messing up like that. I've followed the tutorial through the first 1 1/2 hours.
Well, I guess it's all a learning experience.
Thanks for any help, I'm a rookie at this!
Post Reply