ERROR:GUI: Could not create the node since the buffer is full (512) (SOLVED)


Should this be the setting to increase to get more GUI node buffer space? It’s not working for me.

I’m working on a puzzle game which uses GUI nodes with templates which have multiple options able to be toggled except run into this issue and changing this value doesn’t help, it sticks to 512. Is there a different setting that is important to this?


The gui Max count is the total number of .gui components. Max node count is as you’ve pointed out set per gui component (select the root of gui node).

1 Like

Is there a way to get more than 1024 nodes in a GUI scene? A problem is that even if you delete nodes on a frame they are still counted in the max total. So you cannot do a big delete and then recreation if you have template nodes with various sub nodes in a complex game board.

1 Like

Currently, no. That limit is per gui scene. This number is matching the max number of bits for the render key (which is 10)


Will it be changed someday? :blush: It’s sad there is such restriction. Using node based GUI text assets like RichText or Defold-Printer is sometimes impossible with such limit :confused:

It’s certainly not an easy change to do, and it is unlikely we’ll look into this in the recent future.

1 Like

Ok, so any tips what should I do to display large text, that exceeds this buffer, with one of the mentioned assets?

Are you actually displaying more than 1024 text nodes at a time?

In the case of RichText I guess there could be some kind of node reuse implemented. I would need to know more about how it is used first though.

Yes, actually, I tried now with Defold-Printer by @Insality to show a text that is pretty long, so I’m exceeding this buffer. I’ll try with RichText if it’s the same, but afaik they are both based on gui nodes that are cloned, so there should appear this problem too, right?

Yes, likely. RichText will split text into words and create one node per word. This could be optimized to use much fewer words, especially if there’s not that much markup in the text that is presented.

Oh, Defold-Printer splits text into single signs, therefore each of them can be animated. That’s why I reached the limit so fast and didn’t manage to do that with RichText :smiley: And it’s all to have a fluid letter-by-letter appearing of text :smiley: I’m thinking about another variation, that could be handled in that way: having a whole text, but displaying the text each iteration with more of the text revealed, so it would be on single node/label, something like (pseudo-lua-code):

    for i =1,#text do
       displayed_text = displayed_text .. text[i]
       gui.set_text(node, displayed_text)

RichText defaults to splitting on a word level but you can also split a word into individual characters so that they can be animated one by one (wave animation for instance).

local chars = richtext.characters(word)

And to reveal more and more of a text you can use the truncate function:

richtext.truncate(words, length)
1 Like

Yes, yes, I remember it :smiley: Though, it is a bottle-neck for long text if it comes to this buffer actually :smiley:

What do you mean by this? I didn’t really understand.

I am just still referring to my previous post here:

so it’s impossible to show a lot of cloned nodes (representing signs/letters), because of the error in the topic

I’d like to play around with this a bit and see if I can optimize node usage in RichText. Can you share the text and the setup with me? Or even better create a GitHub issue!

1 Like

@Pawel, yea, you right. Defold-printer designed for short dialogs, so it will be hard to display a tons of text in one time.
Possibly, I need to create notice in library, to notify about this problem
Or add some “word” mode, as in Rich text, to create text nodes with several letters :slight_smile:

1 Like

Yes, I’m on my way :smiley:

One solution for large text is really simple, as I wrote:

But now it’s checked code:

local dialog_node = gui.get_node("dialog_node")
local cursor = 1
local now = ""
local text_timer = timer.delay(0.03, true, function()
	now = text:sub(1, cursor)
	gui.set_text(dialog_node, now)
    cursor = cursor + 1
	if cursor == #text then

Just add text node to the gui. If the Pivot is set to west it will looks like adding a letter one by one. Else if set to center it will look like unwraping scroll :smiley: And you can make anything with the text node. But, not with single letters, so the advantages of RichText and Defold-Printer tags are impossible here afaik.

I have another idea for large text for node based assets - If there is a lot of letter of the same vanilla style/font (without animations), you could wrap a bunch of letters in the single text node, like RichText’s word-based nodes, but even more words bundled together, is it clear? :smiley:

Anyway, there is an Issue:

1 Like

I’ve released a new version of RichText where you can specify that words of the same style (size, font and color) should be combined into a single node to reduce node count. This is done on a per line basis, which theoretically allows you to have a text with a line count equal to the max node count of your gui.

A further and future improvement would be to add support for also combining multiple lines, but the current solution was fairly easy to implement.