Jump to content

fps drop to 14 when drawing in update function


Recommended Posts

I'm using Phaser2 to make a simple game.

When I set the game width and height to these:

var Screen_Width = window.innerWidth * window.devicePixelRatio;
var Screen_Height = window.innerHeight * window.devicePixelRatio;

The game runs really slow on my iPhone. What is the problem?

Link to comment
Share on other sites

Thanks. I figured it out. It was because I was doing something stupid in Phaser. I didn't really understand that you create multiple graphics objects for drawing multiple things. Instead I had one graphic object drawing everything and it worked sometimes and not other times.

Thanks again!

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.

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.


  • Recently Browsing   0 members

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