Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

big amount of sprites, bad performance


chris1986m
 Share

Recommended Posts


Hi guys,

 

i stopped the Development of my Game a few months ago, but now i want restart and bring the project to the end...

 

I have a simple question.

 

Is it possible to handle a huge amount of sprites (with Arcade Body for collision) with phaser?

 

On my Design i have Maximum 8x16 tiles with a size of 48px. 128 sprites. All with a very small Image as Texture.

 

I have tried different ways of generating. Create every Sprite directly in phaser and my prevered way use tiled.

After generating, the Position is set out of the Screen and i want to Move all Sprites from Right to left.

When they arrive the left site, i Delete the tilemap, Reuse the Sprites and Generate a new tilemap with Sprites.

 

This should Look like jetpack joyride. You can make star Pattern with tiled or cool wall pattern.

 

But my Problem is the movement with this amount of Sprites.

every Sprite Body gets a velocity of 200-300 (really fast) for example.

But You can See a hacking, jizzle. I dont know whats the Name for this Really Bad Performance. You can See it on Browser like Chrom and in cocoonjs launcher (iphone5s).

Phaser (newest version) is Render in Canvas Mode. FPS are very good...

 

Is it not possible to make a smooth movement with a big amount of sprites?

Do I have to reduce the sprites to 30-50 per tilemap?

Is this to hard for html5 game, should i change to swift?

 

Is here anybody who knows the problem and a solution?! Maybe via PM.

I've checked the whole internet and tested every tutorial and tip, but nothing brings me better performance.

Do anybody knows an insider, who can help me.

 

I dont want to make an easy flappy bird clone, it should be something special =)

But if this is not possible, i've to think about my game design and change something...

 

Regards

Chris

Link to comment
Share on other sites

You said "Generate a new tilemap with Sprites."

Most periodic jittering is caused by periodic garbage collection in the browser.

You should try to not make any new objects (any!) in the update loop.

 

Maybe you could create two tile maps, and when the first is moved to the left, just modify the position to the right, and modify the tiles.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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