Help test a refactored Physics behavior

Discussion and feedback on Construct 2

Post » Fri Mar 09, 2012 6:54 pm

Hi all,

I've found a slightly updated version of Box2D that ought to be faster and reduce the garbage collection overhead. This should help reduce pauses or stuttering in complex physics-based games. I've done some of my own customisations and the final script after export should come out smaller too.

However since it's modified it might not work exactly the same as it used to. If you could give it a spin and give me any feedback on performance, GC pauses and functionality, that would be great... it worked fine with all the Physics demos I've made, but I don't want to slip a big change like this straight in to a new build in case it breaks lots of games.

Here it is - back up your old runtime.js for the Physics behavior then try pasting this one in:
http://dl.dropbox.com/u/15217362/physics-refactored2.zipAshley2012-03-09 19:57:18
Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Post » Fri Mar 09, 2012 7:30 pm

I'l give it a spin after midnight and report back after it.
Extra speed on the physics part is a real gem!

Thanx!
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Fri Mar 09, 2012 7:36 pm

I tried it with my project, but unfortunetly it fails to load the game. Tried it with preview mode and exporting, in both Chrome and Firefox.

Chrome console is giving me this error message:

Uncaught ReferenceError: b2Vec2 is not defined

If you want me to try more things just tell me, I'll help in any way I can.Xavier2012-03-09 19:37:44
B
63
S
23
G
17
Posts: 254
Reputation: 14,342

Post » Fri Mar 09, 2012 7:39 pm

@Xavier, what was the reported line number? Any chance you can share the .capx?Ashley2012-03-09 19:39:56
Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Post » Fri Mar 09, 2012 7:49 pm

Im also getting the error.

B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Fri Mar 09, 2012 7:57 pm

Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Post » Fri Mar 09, 2012 8:03 pm

[QUOTE=Ashley] Ah, is this one any better?
http://dl.dropbox.com/u/15217362/physics-refactored2.zip[/QUOTE]
Yes, this one does work. I will do more testing in a few hours with my laptop, because with my desktop it laways runs at fullspeed.Xavier2012-03-09 20:04:36
B
63
S
23
G
17
Posts: 254
Reputation: 14,342

Post » Fri Mar 09, 2012 8:03 pm

It runs!

Cant yet say that it has become more speedy, but then again im not using more then a few physics objects.
It works fine for what its suposed to do in my game.
I also run it on my laptop currently.Savvy0012012-03-09 20:04:17
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Fri Mar 09, 2012 8:15 pm

My test puts it at the exact same speed.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Fri Mar 09, 2012 8:16 pm

Well, it would only be faster when using a very large number of objects. The main difference should be that garbage collection pauses or stuttering are reduced in big games.
Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Next

Return to Construct 2 General

Who is online

Users browsing this forum: humanescape, shinichild and 10 guests