About the jerkiness on the movement...

Discussion and feedback on Construct 2

Post » Thu Oct 16, 2014 8:40 pm

Colludium wrote:On my old wheezing laptop, webgl off produced smoother scrolling than when it was on...

So I just did a rather unscientific webgl on/off test on the layout I'm working on - and webgl off is smoother by a country mile (Intel HD4600 and i7 with more RAM than I will ever need). That's not right, is it?

Edit to add that after 10-15 secs the webgl on scrolling becomes smooth, it's only a visible issue at the start of the layout.


WebGL adds some overhead on the JS part, that would confirm the Garbage Collection then.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Thu Oct 16, 2014 8:48 pm

Good questions @skelooth, and no - I have no webgl shader effects on my layout, platform behaviour, 4 parallaxing layers, 220 objects and 30 collision checks per tick. The interesting thing is that the engine seems to settle down after a short while, and that it seems to get 'upset' by changes to the layout content....

I just tried Ashley's performance test in Chrome... webgl off = 6000 objects at 30 fps, webgl on = 4000 objects at 30 fps. I have no idea why webgl would be less efficient than canvas... I got similar but slightly worse performance in Firefox.

here's the link to the blog with the perf tests
Last edited by Colludium on Thu Oct 16, 2014 8:51 pm, edited 1 time in total.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,303
Reputation: 47,590

Post » Thu Oct 16, 2014 8:50 pm

@Aphrodite, GC is where my suspicions lie as well.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,303
Reputation: 47,590

Post » Thu Oct 16, 2014 9:10 pm

@skelooth , I don't know how to check if it's reported incorrectly, I am able to run very complex scenes with tons of webgl effects in constant 60 fps and the jerkiness will be the same. If my card is somehow blacklisted and my tests run on brute force with a handicap that takes the form of stuttering, I would very much like to know how to check and fix it, although the same will hold true to any other user that will try to play the game and will be vulnerable and hopeless against the Browser's capricious blacklisting. Also, if this isn't the case, I wonder what good is disabling webgl in C2 is for, if it creates this kind of fundamental problem. I don't think that's the case.

On the other hand, contrary to the issue mentioned in this post low-fps-in-c2-games-is-more-crippling-than-it-should-be_t116403 , I don't encounter these crippling problems that are mentioned there when the frame rate goes below any reasonable value. I made a test that spawns sprites until any given fps threshold and up to 17.000 sprites or so I get 60 fps. If I continue to spawn sprites the game still feels ok until 20-25 fps (around 27.500 sprites), at that time it just doesn't feel responsive anymore. The jerkiness issue that I have exists in every intermediate frame rate value, but when the fps drop as low as 20 or so it's not anymore a noticeable or relative issue.

Also, in your last post if you are referring to Colludium , he has Intel HD graphics, I am the one that mentioned the 660 ti.

@Colludium , are you sure that you can't detect the issue after 10-15 seconds? Remember that it comes and goes sporadically and it's evident if you keep following the square with your eyes (in my example). Otherwise, you need to have some kind of interactivity to notice it (like a platformer that moves and jumps around), or infinite scrolling backgrounds that move at constant rates.
And yes, I feel too that changes in scenery (like moving into an other area of the layout) affect this issue. I just don't even go that much ahead, I want to nail it and see if it exists even at the basic level.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Thu Oct 16, 2014 9:21 pm

Also, in your last post if you are referring to Colludium , he has Intel HD graphics, I am the one that mentioned the 660 ti.
I'm just too lazy to cross reference who's saying what, and offering my experiences in hopes that someone finds them helpful.

When you are benchmarking all of these sprites, do they move? (so you can look for jitters?) 27,000 sprites is an aweful lot. At that point the bottle neck might be CPU and not graphics since it needs to loop through all those sprite objects each tick. Bottle necked code by nature feels unresponsive, because it takes longer for input signals to get processed.
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730

Post » Thu Oct 16, 2014 9:51 pm

@eli0s, you're right - I can still detect the jittering after 10-15 secs, it's just far less pronounced after that time. Incidentally, if I try and do any periodic work using sprites (like ray-casting with collision checks every 0.5 sec) then that seriously impacts on smoothness. I'll try and put a small demo together to show you what I mean. But, bottom line, the jittering is always present to some degree and it really spoils what would otherwise be an awesome engine.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,303
Reputation: 47,590

Post » Thu Oct 16, 2014 10:45 pm

@skelooth , I made the test so to force the fps below 60. I'd the rotate behavior added to the spawned sprites but I wasn't using them as reference for performance. I was checking for jitters or any other performance artifacts with an other Sprite that had the platform behavior and I was jumping around the layout an other sprites with the solid behavior. Basic stuff. My point for cross referencing the other topic is in relation to your earlier post in which you mention low frame rates. My purpose was to refrain the connection between frame rate drops and the jerkiness I describe. They seem to be unrelated for the most part. Even at the beginning of the layout in which the jerkiness is more evident (as Colludium also notice), although the frame rate is also lower that 60 for a few seconds, I don't think that there is a direct relation between them.

@Colludium , I thought so. That happens to be the jittering that I mostly care about, because at least at the start of the layout you can find ways to hide it (a cutscene for example), but during the gameplay is super underwhelming to cope with... Please do post a demo, it will help all of us to underline and better understand the problem.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Thu Oct 16, 2014 10:55 pm

Here's a quick example I put together to hopefully demonstrate the effect I'm talking about. It contains a couple of deliberate inefficiencies (creating unnecessary objects and then destroying them), but they serve to create the effect I'm trying to demonstrate. I would have thought that a tiny project like this (2.8 mb image memory) would not cause any problems on my mighty laptop...

Are my expectations of html5 just way off?

Edit - it's a simple platformer with stuff happening... Standard controls.
You do not have the required permissions to view the files attached to this post.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,303
Reputation: 47,590

Post » Thu Oct 16, 2014 11:16 pm

@Colludium , I experience exactly what we describe above on my desktop. Although the simple graphics at first makes the problem somewhat less noticeable, if I run around from start to end back and forth it begins to be very noticeable. Also, I believe that the more detailed and refined the game is, the more evident the problem will be, because it's one thing to look at a solid square jumping around and an other thing to see detailed animations get chooped for no apparent reason.

By the way, very instructive and useful line of sight system you have there! I learned something today ;)
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Thu Oct 16, 2014 11:41 pm

@eli0s, thanks! And I agree, I think that the more complicated the game (graphics and events) then the more pronounced the effect becomes. It makes me feel like I'm developing for mobile when, in fact, I'm targeting whopping big hardware that can easily cope with the likes of GTA!
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,303
Reputation: 47,590

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests