target fps

Discussion and feedback on Construct 2

Post » Tue Sep 10, 2013 5:08 pm

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)??
B
14
S
6
G
1
Posts: 143
Reputation: 1,800

Post » Tue Sep 10, 2013 5:37 pm

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

B
49
S
9
G
4
Posts: 426
Reputation: 7,071

Post » Tue Sep 10, 2013 5:43 pm

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.)
B
14
S
6
G
1
Posts: 143
Reputation: 1,800

Post » Tue Sep 10, 2013 5:50 pm

Might want to read up on the canvas plugin. Pretty sure that's what's causing the performance issues.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue Sep 10, 2013 5:51 pm

Unfortunately, I cannot do without the Canvas plugin since there's no other way to draw circles and lines in realtime...
B
14
S
6
G
1
Posts: 143
Reputation: 1,800

Post » Tue Sep 10, 2013 5:57 pm

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!
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Tue Sep 10, 2013 6:04 pm

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)
B
14
S
6
G
1
Posts: 143
Reputation: 1,800

Post » Tue Sep 10, 2013 7:20 pm

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.
B
49
S
9
G
4
Posts: 426
Reputation: 7,071


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests