target fps

  • I've been developing and testing a small little platformer in Chrome, and I've been really happy so far (besides a few little quirks here and there) with the performance. But on a whim, I decided to monitor the fps, and it's consistently betwen 27 & 30. Personally I don't see this as a bad thing (heck broadcast animations are only at 29fps) but I keep seeing people here in the forum reporting 60fps and sometimes higher. My platformer isn't really anything all that complex, and there are not a whole lot of objects on the screen, so I'm befuddled as to why I'm at 27-30 fps when everyone else is reporting 60.

    1 layout, 76 events, 2 tiled backgrounds, 2 main sprites (player and enemy) and something like 15 objects or so.

    So what really is an acceptable fps for a browser game? Is 27-30 as bad as it sounds (when compared to 60fps)??

  • We really need to take a deeper look.. What is the overall resolution? How big are your "sprites"? How many animation frames? Is each image trimmed as cloesly as possible? Do you have tons of "for each object" events going on? Are you using any physics? How many collision checks are going on with eact "tick"

    best of luck.

    Mike

  • Actually, I found it. And it's kinda bumming me out. I have a debug mode that displays a lot of object information, and also uses the Canvas plugin to draw circles (reflecting object rnages). Redardless of the mode is enabled or not, it appears to be doing something. When I disable the whole group, it jumps right up to 60. So obviously I need to re-think my debug mode display.

    (BTW, even though I call it a debug mode, it's not really for "debugging"... it's to give the player additional information.)

  • Might want to read up on the canvas plugin. Pretty sure that's what's causing the performance issues.

  • Unfortunately, I cannot do without the Canvas plugin since there's no other way to draw circles and lines in realtime...

  • The canvas plugin apparently has a memory leak when using webGL, which could explain your poor performance.

    You can certainly draw circles and lines in realtime, that's what sprites are for!

  • Create a sprite with a circle then dynamically re-size it to show a variable "radius/range", and it ends looking like pixelated crap. That is not runtime drawing of a circle, that is displaying an image and re-sizing it, and it looks horrible. It's what I did first before looking for an alternative (aka Canvas plugin)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • how bid goes the circle need to get? If you start with a big circle image in your sprite, it won't pixelate anywhere near as much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)