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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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