Jump to content

How many simultaneous sprites can Phaser 3.6.0 handle?


austincap
 Share

Recommended Posts

I typed "how many sprites can phaser handle" in the search bar and didn't get any relevant results.

My game can't seem to handle more than 1,000 sprites simultaneously on-screen before the FPS dips below 40 (what I deem acceptable). Is this reasonable? From what I've read other games typically don't have more than 300 sprites loaded into the game world simultaneously, but I'm trying to make a game that let's users add content dynamically and I want to know what the upper limit should be.

According to the Chrome profiler tool, "Animation Frame Fired" is taking up most of my resources. Is there anyway around this?

Thanks.

Link to comment
Share on other sites

Are you using SpriteBatch? If it's implemented correctly in Phaser, batched sprites (i.e. sprites that use parts of the same texture) can be drawn with a single WebGL draw call, which can mean tens of thousands of sprites without a noticable dip in framerate.

I use a Chrome extension called Spector to inspect the WebGL calls made by web pages, which can help you determine how much room for improvement there is available.

Link to comment
Share on other sites

11 hours ago, austincap said:

I typed "how many sprites can phaser handle" in the search bar and didn't get any relevant results.

It's not a question with a single simple answer as it depends on what hardware its running on

Link to comment
Share on other sites

I'm not using SpriteBatch but I don't think it's relevant for my purposes. Basically in my "game" players make posts, like you would on a message board. Each "post" is comprised of 4 sprites: the post-type (basically the block outline), an identicon representing the text data, the text data itself, and the sprite for the number of upvotes it currently has. On top of that, there's enemy sprites, bullet sprites, and image sprites of the post is for a picture. Also replies have dynamically drawn reply lines.

For the record, my system is Windows 7 x64, 8GB ram, 3.3 GHz quadcore, and 2GB video memory.

 

 

memewar.png

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...