pau-tomas / gb-studio-plugins

A set of experimental plugins for GB Studio
MIT License
101 stars 10 forks source link

Display Background Text overflows into tiles that have been previously written into #5

Open HeyItsLollie opened 2 years ago

HeyItsLollie commented 2 years ago

It looks like there's no limit on the amount of space that Display Background Text can fill. So if you have a large continuous string of white tiles, the text-writing routine goes hogwild and fills as much as it can. Edit: This large overfill issue was happening because I had used the same background in a "logo" scene.

20220516_21-10-23-561

Requesting a "length" field or width/height fields, and an option to clear tiles before writing. 🙏

This doesn't happen as severely when background tiles are present, but it does still affect tiles previously filled with text.

20220516_21-16-37-406

Steps to reproduce: GB Studio 3.0.3 Create a new scene, use any background. Create an actor, and add the following events to On Init: gb-studio_20220524_12-17-21-586

HeyItsLollie commented 2 years ago

An update on this after asking around on Discord:

1) The massive overfill issue was happening because I was using the default "placeholder" background in a Logo scene as well. Changing the Logo background fixes this, as does removing the Logo scene entirely (in my case, I don't actually need the scene). Chalk this part up to user error.

2) The text-drawing routine does still overfill into tiles that have been previously written into. Here's an example where the text only starts spilling into the next line after I've printed a larger string into it. 20220524_12-19-29-712

Funnily enough, the overfill respects newlines. I begin drawing at X:4, Y:4, and then insert a newline after the word "of". The text drops to X:4, Y:5, and so the text-draw routine skips tiles X:0 to X:3 when overfill occurs.

From what Rulz has told me (via the GBStudio discord), this is a byproduct of intended behavior, and can occur with dialogue boxes as well when too many lines are printed. Apparently map tiles need to be reset before redrawing - I'm assuming this would prevent overfill.