About the jerkiness on the movement...

Discussion and feedback on Construct 2

Post » Sat Nov 01, 2014 7:57 am

Is this a recent issue because over a month ago I did not have this issue (and never noticed it over my time using C2), but today booting up C2 r185 with the latest chrome, even a simple blank canvas with a few sprites moving around, there definitely is random jerkiness even though its reporting 60 fps.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Nov 01, 2014 2:29 pm

@Silverforce - agreed. I never had this problem either until installing the latest chrome. I have noticed some improvement since installing the latest chrome beta. My old notebook had chrome 37 but before I got a chance to check it out, google auto update replaced it with 38 (even though I had auto update disabled).
Image
B
20
S
4
Posts: 382
Reputation: 2,974

Post » Sat Nov 01, 2014 2:50 pm

This just in: Small update in Chrome causes disturbances in C2 games and chaos amongst the Scirra Community. Will it be fixed? Who knows. "It's out of my hands. Stop blowing up my inbox" says Ashley, lead developer of C2.

Thanks for watching and tune in next month for the exact same thing.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Nov 01, 2014 3:24 pm

OK, well, if you're creating/destroying 100 objects per tick then the CPU overhead of the create/destroy actions comes in to play. These need to do things like update object instance lists, families, containers, initialise the default state, initialise behaviors and so on. Most people don't create hundreds of objects per tick so it's not a significant overhead, but in this case it is measurable. I still don't think it's anything to do with garbage collection. The engine still recycles objects when it creates them, but creating an object just involves more work than re-positioning it. So in this specific kind of use case (you're basically recreating particle effects with sprites) repositioning is cheaper, but this does not prove garbage collection has any involvement at all.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Sat Nov 01, 2014 3:25 pm

Tokinsom wrote:Will it be fixed? Who knows. "It's out of my hands. Stop blowing up my inbox" says Ashley, lead developer of C2.

Uhh, how about "it's already fixed in Chrome Canary and Mozilla are working on it too"? :P
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Sat Nov 01, 2014 3:43 pm

Oh cool. This does happen pretty often though. Yeah it always gets fixed but not without an entire campaign by the community -w-;
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Nov 01, 2014 3:52 pm

I can confirm this, tested with win8, chrome canary on my gaming pc the issues are gone! this is so awesome! now we play the waiting game till its implemented everywhere but i am so happy and motivated right now! thank you so much @ashley and everyone else and of course the chromium dev team!
B
19
S
7
G
1
Posts: 222
Reputation: 2,546

Post » Sat Nov 01, 2014 7:54 pm

Okay, so I finally got around to installing canary and just did an initial test...wow. No random janks and, overall, much smoother performance. Even when the framerate drops, canary seems to be handling it much more gracefully than before. Almost as well as IE. Color me happy :)

@Ashley
Ashley wrote:OK, well, if you're creating/destroying 100 objects per tick then the CPU overhead of the create/destroy actions comes in to play. These need to do things like update object instance lists, families, containers, initialise the default state, initialise behaviors and so on. Most people don't create hundreds of objects per tick so it's not a significant overhead, but in this case it is measurable. I still don't think it's anything to do with garbage collection. The engine still recycles objects when it creates them, but creating an object just involves more work than re-positioning it. So in this specific kind of use case (you're basically recreating particle effects with sprites) repositioning is cheaper, but this does not prove garbage collection has any involvement at all.


First off: I'm not arguing that this is a bug with construct. Nor is recycling my idea...I got it from you (wish I could find that thread; you advised someone to reposition rain drops instead of destroying them).

However, the discrepency doesn't require 'hundreds of objects per tick' to be created and destroyed. Here's a modification of the DestroyVsMove test that only creates/destroys aprox 20 objects per tick. Jank is still visible, even on IE and Canary.

https://www.dropbox.com/s/glmtne23yud75 ... .capx?dl=0

Your comparison with particles is apt; however, particles can't collide, which is why I use sprites for bullets. The object count in the above test may be high, but the results I'm seeing are courtesy of an Intel i5 3570k. Lower power systems (most pc's/tablets/phones) will have lower thresholds.

tl;dr: If you are creating/destroying more than ~20 objects per tick, recycling may provide much stabler performance.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Nov 01, 2014 9:32 pm

Here are updated benchmarks. Take note of the cpu readout:

Low Flo: https://www.dropbox.com/s/vild3og8h4j6n ... .capx?dl=0

Generates 20 objects per tick. Speed is 110.

High Flo: https://www.dropbox.com/s/61jtxzcbsbtg1 ... .capx?dl=0

Generates 60 objects per tick. Speed is 330.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Nov 01, 2014 10:03 pm

I personally don't know many instances where I need 1200+ objects constantly being created every second.
That's what you are describing. Your 20+objects a tick is 1200+ objects a second being created and similarly destroyed only to be created again.

I would still be interested to see said 20 a tick improved. But I also want to see how that performs realistically. Creating worst case scenario projects isn't helping with making real games.

We are not talking about using 1200+ objects. This is creating and destroying this many, objects on top of trying to use them on top of any other game logic.
The OP was about a single sprite moving and seeming jittery/stuttering. This new scenario is one of insanity in my opinion, a non issue. I would love to see objects rendered more smoothly though.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Cojoyo and 11 guests