Text displays as a big black box

I have searched the forum for this so if I missed something I am sorry.

In my previews, my text displays fine. I’ve been packaging and testing my game on my phone and the text in menus and things like that just displays as a black box.

It’s weird because I have multiple scenes that use text. Actually my game uses a lot of text, it’s sort of a text-based game.

Some of the objects work and some don’t, and everything is the exact same on all of them. That’s really the mystery.

I can send specs if you want, but they are basically just regular text objects, size 58 text. Color black, which is the same color as the boxes that it has turned into.

The black box is basically just as big as the text box, and it’s solid black.

One other text object in another scene simply failed to appear altogether.

Has anyone ever encountered anything like this?

Do you think the fact that all the text objects have the same name would have anything to do with it? I figured that the scenes being different, I could name them, for example “Story” or “Dialoge” in each of the scenes.

I’ve been using a lot of the same names for the text objects over and over again… Is there a chance that could be the reason?

(Other text objects seem to be working with identical names. But I guess those ones have bold or italics? They exist on the UI layer as well. I don’t know.)

Thanks in advance for any insight into this. I’ve been looking at this for hours, double-checking everything. It looks like everything should work to me.

Hi,
Did you fix this?
Are you using the default font? No text background color? Are you using the actions appropriate to the object type?

Hi thanks for checking back in! I appreciate it.

I’ve been meaning to come back and detail my solution for anyone else who might have this in the future.

The solution I found was somewhat of a workaround, but it also solved other (potential) problems as well with the text object type.

I’m still not sure why the text object displayed as a big black box, but I’m thinking the reason is that it was too big for the window.

I have the text display down the page in portrait mode, and have the player scroll using a behavior (I forget which) but anyways, all the text works perfectly except for when it is too big for the window.

It could also have to do with the bits in the text object maybe, as the malfunctioning ones were relatively long (maybe a couple hundred words).

The solution I eventually settled upon was to replace the text boxes with bitmap font objects.

There’s a great tutorial in the wiki about how to use the bitmap font object, so I won’t get into it, but the font is also easier to work with on the page because it’s not stored as text data, it is stored and displayed as an image.

That means, essentially, “what you see on GDevelop is what you get on the phone” or anywhere else you want it to display. With the text object, the display depends somewhat on the way the device/browser of the user and how it interprets the text data. With the bitmap font, there’s no interpretation, it’s an image so it appears the same everywhere (size in relation to page, etc).

So that was my solution. I think it looks a lot better now as a result.

Thanks for checking back in!

1 Like