Maximum Text Plugin Size

0 favourites
  • 10 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • Ok, I realize this is a really, really strange question but trust me, I have a need for a VERY large text box.

    What's the maximum size, either in total pixels or height, that a text plugin can be?

    When the size of the text plugin reaches a height of around 16,400 px, the text vanishes. The contents are still there and the box itself seems to be inteactable but the fonts just disappear. As soon as I reduce the height below 16,400 px, the text reappears.

    Am I reaching the limitations of the text box plugin or is there some way around this?

    Thanks

  • What would be the benefit of having that large a text-box?

    Why not use multiple or split up the text?

  • Thanks for the idea LittleStain,

    Again, I know this sounds odd but should I pull it off, I'll put a version up on the arcade. Let's just say it's something VERY different from anything else I've seen made in construct.

    Multiple text boxes wouldn't work. First, I'd have to figure out how much text and at what font size fits within the 16.4k size. That means running multiple checks to see at what point the box exceeds that size. Then, if the text is larger than 16.4k, in order to make it look like one continuous block of text, I'd have to somehow split the text based on lines rather than words or tokens (difficult to do with wordwrap). Then, I'd have to position the next text box below that one and track it's position. etc...

    It would be nightmarish.

  • Test it and see?

    Let us know how it goes.

  • And, I found a workaround.

    I turned WebGL off for the project and I stopped when the text plugin size reached 102k px height, which should be plenty for my purposes.

    For some reason the WebGL has an issue with creating huge text plugins.

    Fortunately, for my purposes, WebGL isn't essential... but it did make things work smoother.

  • Maybe try SpriteFonts?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • For my purposes, that would be out of the question. The fonts need to be changeable and of good quality.

  • Use a textbox instead, and set the font size with some css. You can even scroll the editbox by using some javascript with the browser object.

    https://dl.dropboxusercontent.com/u/542 ... croll.capx

    The issue with the Text object is you're running into the browsers canvas size limit, and with webgl the texture size limit. You can circumvent it by using one text object per line if you still prefer to use them.

  • Note Text Box is a different plugin to the Text object: Text Box is a form control, and Text is the normal way of labelling things.

    In WebGL mode, text is rendered via a WebGL texture, since WebGL does not have the capability to directly draw text itself. This means you are limited by the maximum texture size of the system, which is typically around 4096, but on high-end system goes up to 16384 (which seems to match what you describe).

  • Thanks ASHLEY. Glad you understood what I meant even though I misworded text and textbox. That perfectly describes what I was experiencing. The good news is, for my purposes, with WebGL turned off, the maximum text plugin size seems to be unlimited. And because the textbox plugin uses scrollbars with no way to detect if they were visible, and no ability to resize the box based on the text height, it was totally unsuitable for my purposes

    I uploaded my app to the Scirra Arcade (even though it's not a game and didn't fit into any category) you can test it out in the new games/other games. It's named uPrompt Nomad (sorry, can't link yet)

    As a test, I copied and pasted Moby Dick into the editor and the text plugin was able to display and scroll the entire novel in the text plugin with the font size at around 50px. It was a bit laggy but that test is an absolute extreme of what I'd expect it to do.

    Thanks for confirming that WebGL wasn't going to work.

    And thanks for C2! Along with being a shareware author, I'm now an app developer. I have just published this privately on the Chrome Web store as a free app and will be uploading the paid app in the next few days. Android and other platforms are soon to follow.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)