HOME | DD

psykopath — Physics Test

Published: 2009-02-20 04:54:58 +0000 UTC; Views: 6368; Favourites: 54; Downloads: 93
Redirect to original
Description Something I've been doing the last few days. APE has been the first physics engine I've managed to understand and easily use. Box2D confused the crap out of me.

Anyway, click and drag to make objects.
Press and release CONTROL to swap between rectangle and circle.
SPACE to reset.


While APE is easy to use, it is not very stable. Creating a single rectangle will sometimes slide to the right , with nothing but gravity affecting it; nothing stabilises.



Uses s framerate graph [link]

Uses APE (Actionscript Physics Engine) [link]
Related content
Comments: 26

C0rupt3d [2009-12-26 05:51:42 +0000 UTC]

hey how u going i was interested making a game out of this were u have to make blocks / circles to get a stickman to one side to the other would u be interested in helping me with this !?

👍: 0 ⏩: 0

JohnJensen [2009-08-14 15:43:49 +0000 UTC]

I could entertained for hours with this. :D

👍: 0 ⏩: 1

psykopath In reply to JohnJensen [2009-08-16 01:01:39 +0000 UTC]

Heh, thanks. I added pausing and sontraints to it but never uploaded. I think I'll figure out how to use Box2D before I do any more stuff like this.

👍: 0 ⏩: 0

doc-d [2009-06-22 17:31:49 +0000 UTC]

nice tryout! i also thought APE was more easy than box2d or Fisix. Not so long ago i made a game with APE
[link]

👍: 0 ⏩: 1

psykopath In reply to doc-d [2009-06-22 22:41:47 +0000 UTC]

Thanks.

Yeah I know, you're on my watch list

👍: 0 ⏩: 0

until-it-bleeds [2009-03-26 13:42:14 +0000 UTC]

What the hell is the red shit moving up the top?

👍: 0 ⏩: 1

psykopath In reply to until-it-bleeds [2009-03-26 21:56:33 +0000 UTC]

Frame rate.

👍: 0 ⏩: 0

lazermoose [2009-03-24 18:47:02 +0000 UTC]

This usually runs at 100-125 FPS for me, but I got it down to 3.2 FPS hehehe

👍: 0 ⏩: 1

psykopath In reply to lazermoose [2009-03-24 21:41:05 +0000 UTC]

Lol Thanks for the watch, I'm going to submit the newer version of this soon.

👍: 0 ⏩: 0

Darkdragon15 [2009-03-16 18:39:48 +0000 UTC]

that was fun lol

👍: 0 ⏩: 0

fighterlegend [2009-02-21 19:41:50 +0000 UTC]

Nice, try making some joints so you can connect circles and rectangles.

👍: 0 ⏩: 1

psykopath In reply to fighterlegend [2009-02-22 00:11:39 +0000 UTC]

Yeah that's next. It's all there to do within APE, just have to make the interface.

👍: 0 ⏩: 0

HiddenSpartan [2009-02-21 05:16:55 +0000 UTC]

Apparently Emanuele Feronato a lot of tutorials on Box2d.

👍: 0 ⏩: 0

wonderwhy-ER [2009-02-20 08:15:52 +0000 UTC]

Yeah I would say Box2D is clear example of why I don't learn C++ much. For some reasons many C++ projects look messy yet Java/C# and some other languages including AS3 can have pretty clean and understandable style.

Well when I tested APE some time ago official version had far less features then Box2D... Yet even Box2D does not have some... Another thing is that Box2D does not use AS3 specific optimizations it is almost a clean port...

👍: 0 ⏩: 1

psykopath In reply to wonderwhy-ER [2009-02-20 08:46:34 +0000 UTC]

Yeah, the downloadable version on the site doesn't support rigid bodies (rectangles don't rotate, etc), but in the google code SVN there is newer versions.

My main problem with Box2D was the lack of documentation. I tried learning what I could from the demos, but there was no explanation for why certain calls were necessary or the parameters they expected.

Hopefully this will be stable enough for a simple game. Apart from everything wobbling slightly and never stabilising, it easily handles 20+ active objects (not including fixed objects for level layout).

👍: 0 ⏩: 1

wonderwhy-ER In reply to psykopath [2009-02-20 08:53:40 +0000 UTC]

Yeah I heard of it. Do new versions have documentation?

Actually as I said it has same structure as C++ version and C++ had documentation. Plus there is manual on AS3 version as well: [link] [link]

20 objects. Hmm not much actually

👍: 0 ⏩: 2

psykopath In reply to wonderwhy-ER [2009-02-20 11:49:50 +0000 UTC]

No new documentation, but the code is commented a lot. I can't figure out AngularConstraints though, they seem to break straight away
Also, to use it with Flash Player 10 you need to rename the Vector class. I made a Python script to scan the directory and change all occurences of Vector to AVector, then I just had to rename VectorForce which was accidentally affected.

👍: 0 ⏩: 1

wonderwhy-ER In reply to psykopath [2009-02-20 12:17:48 +0000 UTC]

Heh That's why language developers prefer not to add new keywords after language become public...

👍: 0 ⏩: 0

psykopath In reply to wonderwhy-ER [2009-02-20 11:39:22 +0000 UTC]

Yeah I had seen that, and it didn't help much.

I got stuck trying to work out what
worldAABB.lowerBound.Set(-100.0, -100.0);
worldAABB.upperBound.Set(100.0, 100.0);
did, and got too frutrated and never tried again It would never work with the values I used, I think I needed to scale them or something, no idea

👍: 0 ⏩: 2

Supa-Monky In reply to psykopath [2009-02-20 14:18:13 +0000 UTC]

AABB is an axis aligned bounding box. lower limit is x,y's lowest numbers, upper is max.

And the world is where objects are allowed in your simulation before they become non-active.

👍: 0 ⏩: 1

psykopath In reply to Supa-Monky [2009-02-21 01:16:23 +0000 UTC]

Yeah but when I changed that to my stage parameters (0,0) (550,400) it'd stuff up. So it didn't work like I thought, and there was no explanation of it.

👍: 0 ⏩: 1

Supa-Monky In reply to psykopath [2009-02-21 04:41:26 +0000 UTC]

probably because of the world scale

👍: 0 ⏩: 0

wonderwhy-ER In reply to psykopath [2009-02-20 12:14:58 +0000 UTC]

Yeah in some ways it's parameters are very confusing... Changing some features that intuitively should not mess up with physics sometimes mess it up... When was writing crystal towers quickly decided not to change settings much as it tends to make engine unpredictable pretty fast... It just seems that Box2D was not designed to be clear... More like efficient for some specific physics simulations ideas behind it...

👍: 0 ⏩: 0

hatpie [2009-02-20 07:31:36 +0000 UTC]

this is friggen awsome

👍: 0 ⏩: 1

psykopath In reply to hatpie [2009-02-20 08:21:03 +0000 UTC]

Yep

👍: 0 ⏩: 0

ssjskipp [2009-02-20 05:34:55 +0000 UTC]

APE is very fun...

And yeah, Box2D confuses me too...never got to sit and learn it...

👍: 0 ⏩: 0