Announcing new physics engine in AS3
August 17th, 2006
Besides audio-programming, still the big thing to be solved in AS3. I'm currently working on a game in as3 (YEAH!) and it needs some accurate physics. I decided to spend some more time to build a flex-library for further projects and development on this topic. There are still a lot of things to implement and some collisionmodels need some proof of robustness.
Features:
ConvexPolygons as Springmodels
Time-exact simulation resolve
Space-Subvision by grids
sources
. drag the corners
.
{firefox still sucks}
Filed under: announce
31 Responses to “Announcing new physics engine in AS3”
-
sascha of H1DD3N.R350URC3 Says:
August 17th, 2006 at 3:09 pmThats a slippery ground! ;)
-
Daniel Aguilar Says:
August 17th, 2006 at 3:14 pm31 fps?? Sweeet…
-
jg Says:
August 17th, 2006 at 3:52 pmThat’s nice, seems pretty solid and I get 50 fps :)
-
felix Says:
August 17th, 2006 at 5:14 pmack! - swf won’t load in my IE.
-
Ash Says:
August 17th, 2006 at 6:38 pm -
drew Says:
August 17th, 2006 at 8:30 pmsweeeeeeeeet! are you going to post the source???
-
Unreality Says:
August 18th, 2006 at 2:38 amHere’s a bug…
====================
7
Error: ……….getNearestCollison………
[Object: CollisionConvexPolyEach]
====================
opps i forget to fill in the anti-spam question before submitting the comment… so I forget some of the error detail =[anyway I know this engine is still in the early stage and good work!
-
Peter Strømberg Says:
August 18th, 2006 at 8:29 amAndré you’re a sick man. The future of online gaiming is in your hands :)
Drew > the source files are there if you can find the link…
-
drew Says:
August 18th, 2006 at 2:09 pmthanks peter- shame, shame, shame on me! nice work andre…
-
Ash Says:
August 18th, 2006 at 9:44 pmAndre,
One thing I’d be interested to know is how you generated the CircleSegments data for the immovable shape?
Thanks!
-Ash. -
André Michelle Says:
August 19th, 2006 at 10:47 am@ash:
I’ve created a simple editor for them. It would be much cooler to spend some time on a more complex editor to provide creating big physic-scenes, but for the current project its completly adequate to what I need.
-
Foxy Says:
August 19th, 2006 at 1:35 pmVery good work ! thanks to share…
-
Bastian Waidelich Says:
August 20th, 2006 at 7:59 pmamazing stuff as usual! I’d love to get deeper into the code - if I only had a clone who could take care of money and household in the meantime ;)
Do you know why RegularSpringPolys act like sprites on speed when they have more than 5 corners?
keep up,
basti -
André Michelle Says:
August 21st, 2006 at 9:47 amThe springs are not integrated over time while the collision-response is acting. They are only updated each frame. For more corners, you should create the springs manually.
-
Dennis Says:
August 21st, 2006 at 11:36 amI’ve noticed, that the motion speed is not constant (waving a little), more visible on weak machines. I have the same problem in my AS3 applications. I’ve tested them with getTimer() and found that some simple linear code snippet can be executed in 1 millisecond or in 50(!) milliseconds (rare but periodic).
Possible this is Garbage collector (runing several times in second). What should we do, guru?Tell somebody to Adobe to make global property .disableGarbageCollector to disable it temporary if needed… :)
-
Diego Says:
August 23rd, 2006 at 10:55 amneat!
53-38 fps in Opera (amd 2ghz, 1gb ram) -
Diego Says:
August 23rd, 2006 at 10:56 amexcuse me, 35-38 :P
-
Paul Says:
August 24th, 2006 at 8:34 pmAndre, thanks for the great work! Love the performance of this engine (and AS3).
Can you tell us if you’ll implement more classes than just ..complex.RegularSpringPoly? I’m wondering if I should work on a RegularCircle, RegularWheel, etc.
Also, what do you think of a non-corner based method of grabbing these polys? You may not need it but it seems more intuitive for me to grab anywhere inside the polygons. I was thinking of creating maybe two mousesprings instead of the current one…
thanks-
Paul -
joa Says:
August 27th, 2006 at 2:46 pmdennis, i can give you some advice. the garbage collector removes unused instances etc. so a possible workaround is to reuse your instances instead of creating thousands of new ones :)
this will speed up the garbage collection. of course you will recognize a lag in performance but a smaller one.
-
Dennis Says:
August 28th, 2006 at 10:44 amto Joe: Yes, I know, some experienced people can tidy their garbage themselves :)
Anyway the lag amounts to 20-50 ms. It’s noticable for smooth lineal motion.
And the most bad thing is GC works asynch, and there is no way to forecast this perfomance lag… -
mianwo Says:
August 29th, 2006 at 9:28 amGreat work!!
Are these bricks rigid body?
How do you build those walls? Bezier curve?
It’s REALY fast and accurate, have you tried impliment joints?Do you know ODE, the Open Dynamics Engine? There is also a java version ODEjava. with AS3, I think it’s possible to implement a AS version of ODE.
-
AVisioN Says:
September 8th, 2006 at 12:41 amGood work. Is this a sideeffect of our german weather these days ?
The problem with Javaode is that it`s a (API)wrapper and not rewritten in Java. And javaode already has it`s own problems.. so someone would port a port wich allready has problems. If this could end up well ?
-
Paul Says:
September 8th, 2006 at 8:11 pmAnd I’d guess that Andre’s verlet engine will run a lot faster than ODE in AS3. His stuff seems pretty efficient and verlet is generally faster than a rigid body simulation like ODE.
Fun stuff!
-
Matt Rix Says:
September 19th, 2006 at 3:29 amHi, this looks really cool.
I was just wondering: What kind of license will this be released under? … And what am I allowed to do with the current source code?
Thanks,
-Matt
-
Lkke Says:
October 17th, 2006 at 9:30 amwhat do you think of a non-corner based method of grabbing these polys? You may not need it but it seems more intuitive for me to grab anywhere inside the polygons. I was thinking of creating maybe two mousesprings instead of the current one…
-
jon Says:
January 17th, 2007 at 5:42 amruns great, 53 fps, firefox/pc/1 gig ram, 2ghz AMD
really great work as always andre
-
Albert Says:
May 1st, 2008 at 4:39 pmfor grid subdivision have you thought about quadtrees? would also be fairly fast for repositioning geometry?
-
Flex Coding « Panduramesh’s Weblog Says:
September 19th, 2008 at 2:20 pm[...] RemoteObject vs WebService benchmark Nico Lierman :: Flex performance component Physics Engines Andre Michelle Moto Flash Physics Engine Scope Timothée Groleau :: Scope Chain and Memory waste in Flash MX [...]
-
Flex with Java « anil4it Says:
September 30th, 2008 at 2:23 pm[...] RemoteObject vs WebService benchmark Nico Lierman :: Flex performance component Physics Engines Andre Michelle Moto Flash Physics Engine Scope Timothée Groleau :: Scope Chain and Memory waste in Flash MX [...]
-
FLEX CODING « welcome nandhu Says:
October 23rd, 2008 at 5:52 am[...] Andre Michelle [...]
-
Flex Coding « Rameshgoud’s Flex Weblog Says:
October 25th, 2008 at 1:14 pm[...] RemoteObject vs WebService benchmark Nico Lierman :: Flex performance component Physics Engines Andre Michelle Moto Flash Physics Engine Scope Timothée Groleau :: Scope Chain and Memory waste in Flash MX [...]

