In defence of tiled sprites

I’ve seen a few times here in the forum about the performance of tiled sprites and that they need a lot of processing and therefore aren’t really performant.

I tried the VictrisGames Load testing example (fascinating) Load testing - a game example from the GDevelop game making app | GDevelop and the conclusions from that seem clear. That is - many normal sprites will perform much better than many tiled sprites. For example, 500 normal sprites run fine but 500 tiled sprites slow things down a lot to less than 10 fps. And of course it gets worse with a thousand or more objects. The sprites and tile sprites in the example are 6 by 6 pixels.

While I accept that tiled sprites require extra processing, I feel that it doesn’t really make sense to compare them one for one with normal sprites. If we are just using them as a static repeating pattern background then one tiled sprite can replace hundreds of normal sprite tiles placed/created in a grid, or replace one gigantic normal sprite.

I modified the load test example to show 10 objects with an increase increment of 10. It wasn’t until I had 40 tiled sprites that there was any performance drop and that was to about mid to high 50 fps. I realise that there are other factors to consider like object culling; the load test project isn’t set up for that.

But anyway, I’ve always avoided using tiled sprites but now, for me, it’s time to give them a go.

1 Like

…uh, what are they, updated every frame? I still don’t understand why theyre so slow

This is true - there must be greater processing required for render and collision - in the space game that i’m doing for my explosion thingy im using tiled sprites - but having done it that way - there’s really no need for them to be tiled as they’re all pretty much the same length. there’s object culling in it and so it isn’t a problem - but i might change them to sprites (i was thinking of doing this anyway!) - before i do anymore work on it!

If you’re using tiled sprites without ‘stretching’ them to get a repeated pattern then yeah, there’s no point in using them instead of normal sprites in your culling system.

yep - it’ll take a while! there’s quite a few …unless i just do it in the events!
I was going to have them all random lengths but there’s an optimum length for the culling since the cell size is 200 by 200 pixels