Game slows when further from tilemap origin (SOLVED)

I’ve got a horizontal scrolling tilemap about 800 x 16 in size. The player starts near the origin (0, 0) and moves to the right.

The further the player moves into the tilemap, the slower the game seems to get.

Is this an inherent feature of tilemaps?

It shouldn’t be… I mean, assuming defold’s tilemap implementation is solid, it should be culling all the tiles that aren’t on screen. I suppose there could be a bug, but I suspect something like that would have been noticed and fixed by now.

Have you made doubly sure that there’s nothing going on in your game that could contribute to such an effect?

Like, do you spawn more and more enemies as the user progresses, and never delete the old ones?

This may be related to default medium precision in tilemap vertex shader. So, there is no real frame drop, it only looks like that.
Try replace mediump with highp.

3 Likes

for reference: Jiggling tile map in iOS (SOLVED)

3 Likes

Thanks everyone :slight_smile:

As @dmitriy suggested changing the tilemap (and sprite) materials to highp solved the problem. The game now runs smoothly all the way through the level.

2 Likes