TileMap and Performance (Other Methods?)


(Robert) #1

Hey Guys. I was doing some testing with TileMap in my shiny new platformer engine. I was hoping someone out there knew the answer to this question before I do a lot of reworking for just a chance of better performance.

I’m building my levels using TileMap. They are admittedly quite large. So I’m noticing that I start getting lag with more than 2 layers of graphics. Call me greedy, I’m building a 1080P game running at 60 FPS. The tiles are 50x50.

So, If I understand correctly, Tilemap is basically building a large image from the tiles, so each time I use Tilemap to make a layer of graphics, I’m making another large image, which Flash doesn’t care for.

So my question is: Would I get better performance by placing more smaller entities/graphics than I am now by using Tilemap to essentially make one large image for each layer? Would I even notice a difference?


(Jacob Albano) #2

I’ll refer you here:

and here:

Long story short, 1080p is overreaching for a flash game. You can improve performance by drawing all of your tilemaps to a single Canvas and using that as a graphic, but it will only improve performance if your tilemaps aren’t changing very often.


(Robert) #3

That’s pretty much what I figured. Fortunately, I’ve been testing quite a bit, and I’m actually pretty pleased with the performance of Tilemaps at 720p /60fps. After all, smooth operation is more important for action games.

I think I’ll give the Canvas method a shot. I’m not changing the Tilemaps much at all. Any performance boost is welcome.

Thanks for the confirmation!