Jump to content

(Large) Tilemap Performance Insights?


tomph
 Share

Recommended Posts

Hi guys,

 

I'm really new to Phaser (and HTML5 games actually), but I've been developing games for other platforms for a while now.

 

I have noticed considerable slowdown when rendering a tilemap (20px tiles, 2540 width/height map) and moving the camera on iOS (4S and 5S).  I have tried in both WebGL and Canvas.

 

From what I gather, this is generally down to the world size and the fact that when the camera moves, the map gets re-drawn.  If this is a limitation to the platform, then so be it.

 

I'm actually here to discuss how I'd go about optimising my large tilemap for mobile.  

 

I am considering building a sprite grid that is one row/col bigger than my camera viewport and dynamically setting textures/physics to sprites (outside of camera view) as I move around my level.  Before I go about doing this, I just wanted to make sure whether it would actually be worth my while?  Is this the correct way of gaining some extra FPS?

I did actually see that someone has created a Tiled Plugin that offers considerable performance gains - however, I'm using Haxe and porting over this plugin will probably take me more time.

 

Any advice on how I could get this game 'moving' would be great!

 

Cheers!

 

Link to comment
Share on other sites

Yeah, I might try this.  

I guess i'd only need to point to those functions that are 'exposed' in your API.

 

I've tried writing externs before, but have failed due to my lack of JS knowledge.

 

Also, your plugin doesn't currently handle collisions right?  How are you going about this in your games?

 

 

Cheers,  

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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