Jump to content

Tilemap system performance


stamas47
 Share

Recommended Posts

So I have been writing this Chunk system for my tilemap game the last couple of days for maps created in Tiled.

My map dimensions are 12288px x 3072px => 384x96 tiles with 4 layers.

One of the most important criterias was that the map had to perform great on any screen size.

What I managed to get was 60 FPS below 1920x1080 and about 32FPS at 2560x1331 with an Intel i5 and Gefore GTX650. At 2560x1331 I achieve this by rendering 113 chunks every frame and checking only adjacent chunk collisions ~30 collisions, with a chunk size of 8x8 tiles with tiles of 32x32 pixels.

 

What do you guys think, is this good performance for a HTML5 (WegGL) game? or compared to what Phaser has to offer out of the box.

Link to comment
Share on other sites

5 hours ago, stamas47 said:

I checked out phaser-tiled but it isn't compatible with the current version of phaser.

My code: https://github.com/SimonTamas/TiledChunks

There is a guide to make it compatible, you just have to fix a couple lines... cannot find it though. It's on their github somewhere. The performance is around 60% better. You can test the difference with the attached, edited one.

Phaser-Tiled.js

Link to comment
Share on other sites

So I managed to load my Tiled map. Performance is great but how do I add my character or for that matter any sprite between 2 particular layers? Collision handling is also limited. Where could I find examples of games made with phaser-tiled?

Link to comment
Share on other sites

2 hours ago, stamas47 said:

So I managed to load my Tiled map. Performance is great but how do I add my character or for that matter any sprite between 2 particular layers? Collision handling is also limited. Where could I find examples of games made with phaser-tiled?

https://github.com/englercj/phaser-tiled

 

Go down a bit and search for collision you'll see. Create a collision layer in tiled and use a red block as the tileset to help. Not really alot of games published made with phaser-tiled, but a developer from Blizzard works on it. It's a great performance increase (Well over 60% more fps) and no lag ever with my game using 4000x4000px maps. And other's feel the same. It should be added into Phaser's core, but I don't want to bug @rich about it because he's super busy :P

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...