Newline in Bitmap Text Object

The current typewriter effects provided in GDevelop do not have predictive word wrapping. If a word in a sentence cannot fit on the same line, it will partially be typed and then be pushed down to the next line by the word wrap width once it crosses it. So there is a brief moment where half a word appears before going to the next line. While it still works, it is not aesthetically pleasing (depends on one’s tolerance for it).

The work around is to manually place a line break and split long lines ourselves to avoid this partial word from ever forming, hence the need for a NewLine().

Ahhh, that makes sense. I was thinking more of a just an open new line by itself.

Also you might be able to solve that need in general by enabling word wrap on your Bitmap Font object settings. I can’t remember how it works. Regardless, Bouh is awesome and has this fix going live soon.

I tried the fix, but there is another problem now: when the text scale is 1 everyhing works perfectly, but if the text scale is not equal to 1 the text is even more decentralized.


In this screenshot, the text scale is 2x.
Anyway, thanks very much for all the work!

2 Likes

I’ll submit a fix in next hours, i’ve also found that the aabb is not refresh when the scale/text/wordwrap change.

Here the fix

@GiAnMMV thx for your feedbacks it was really helpful!!

2 Likes

No, thank you for this very useful new object, I’ve wanted something like that ever since when I started to use GDevelop!
A last question, do you know if there is a way to try this fix before next update?
Edit: All done, sorry.