Drag To Scroll - Out of tiles to render?

#1

I don’t understand lots of stuff about defold rendering, but I am looking at a simple project and it’s giving an error I don’t understand…despite it being a direct clone of the project.

ERROR:GAMESYS: Out of tiles to render (2048). You can change this with the game.project setting tilemap.max_tile_count

What is this about and how is it addressed?

0 Likes

#2

Defold pre allocates most of its resources to avoid runtime allocations. We allocate a certain number of sprites, games object instances, UI nodes and many other things. We also do this for the number of tiles in a tilemap. In this case it seems like the tilemap uses more tiles than the max value. You can tweak your max value in game. project and adjust the value to the needs of your specific project.

0 Likes

#3

I tried setting the max as high as 8192 and still got the same error, even though the tiles seemed to fill then entire bounded area. You can test this, within the project.

1 Like

#4

The tilemap is a bit over 90 by 90 tiles (I didn’t count exactly) so 8192 might be just a little bit too few tiles. I upped it to 9000 tiles and the example works without an error.

4 Likes