Has anyone ported b2RopeJoint to the main flash port?

Discuss issues specific to the Flash/AS3 port of Box2D
Bennett
Posts: 21
Joined: Mon Jul 28, 2008 9:24 am

Has anyone ported b2RopeJoint to the main flash port?

Postby Bennett » Fri Apr 20, 2012 12:29 pm

Has anyone ported b2RopeJoint to the main flash port?

I see that the Alchemy port has it, but it seems like a big job to port my project over just for that - plus, with the new licensing terms I'd prefer to avoid using native code where possible.

AllanBishop
Posts: 2
Joined: Wed May 09, 2012 4:03 am

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby AllanBishop » Wed May 09, 2012 4:07 am

I have just finished porting the b2RopeJoint :) Hopefully it still proves to be of some use for you - if you have not changed over to the Alchemy port already.

See my blog post for details and the files: http://blog.allanbishop.com/box2d-2-1a-rope-joint-ported-to-as3/

Bennett
Posts: 21
Joined: Mon Jul 28, 2008 9:24 am

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby Bennett » Sun May 13, 2012 2:32 pm

Ah, brilliant, thanks a million.

Bennett
Posts: 21
Joined: Mon Jul 28, 2008 9:24 am

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby Bennett » Wed May 16, 2012 9:59 am

It seems to cause a crash when the ropejoint gets wedged against two objects:

Code: Select all

Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
   at Box2D.Collision::b2TimeOfImpact$/TimeOfImpact()
   at Box2D.Dynamics.Contacts::b2Contact/http://www.box2d.org/ns/b2internal::ComputeTOI()
   at Box2D.Dynamics::b2World/http://www.box2d.org/ns/b2internal::SolveTOI()
   at Box2D.Dynamics::b2World/Step()
   at PlayState/update()
   at org.flixel::FlxGame/update()
   at org.flixel::FlxGame/step()
   at org.flixel::FlxGame/onEnterFrame()

Bennett
Posts: 21
Joined: Mon Jul 28, 2008 9:24 am

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby Bennett » Wed May 16, 2012 1:53 pm

further update: setting fixedRotation = false on the connected bodies solves the problem.

/edit make that "reduces but does not solve" the problem

AllanBishop
Posts: 2
Joined: Wed May 09, 2012 4:03 am

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby AllanBishop » Wed May 16, 2012 5:59 pm

So I have been trying to replicate the error by modifying my test environment for the b2RopeJoint by adding in some dynamic and static boxes to try and wedge the rope. I also added in another b2RopeJoint next to the original one. While they do get caught on some boxes, I haven't experienced the #1502 error (except if I randomly spawn a box inside another box). I also set the fixedRotation to true to see if that helped trigger the Error.

Is there anyway you can send me a file that can replicate the problem?

Also, what happens if you replace the b2RopeJoint with a b2DistanceJoint?

I also had another look over the ported code but couldn't see anything obviously wrong. The way I ported it in the first place was to look at the difference between the C++ b2RopeJoint and the C++ b2DistanceJoint as they are already very similar. Then, I could figure out what differences needed to be applied to the b2DistanceJoint of AS3 2.1a to turn it into a b2RopeJoint.

There is a chance there were other changes to the Box2D engine when the b2RopeJoint was introduced that could account for it, or, there could be some bugs still in the Box2DAS3 port.

orangatang
Posts: 5
Joined: Tue Jun 19, 2012 3:40 pm

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby orangatang » Tue Jun 17, 2014 3:11 am

Hey guys the rope joint ported to as3 link doesn't seem to work right now (http://blog.allanbishop.com/box2d-2-1a- ... ed-to-as3/). Is there any other way I can download the code for this? It would be a tremendous help to the AS3 project I am working on right now. Thank You.

orangatang
Posts: 5
Joined: Tue Jun 19, 2012 3:40 pm

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby orangatang » Tue Jun 17, 2014 2:08 pm

Would be the best if the b2ropejoint.as and b2ropejointdef.as were for Box2d 1.01 because that is the version I have worked with for my entire project.

orangatang
Posts: 5
Joined: Tue Jun 19, 2012 3:40 pm

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby orangatang » Tue Jun 17, 2014 2:54 pm


kestorr
Posts: 32
Joined: Tue May 22, 2012 2:37 am

Re: Has anyone ported b2RopeJoint to the main flash port?

Postby kestorr » Sat Jul 19, 2014 7:17 am

Hmm how can i get the ropeJoint for box2d 2.02 version?
Is this http://blog.allanbishop.com/wp-content/ ... peJoint.as usable in 2.02 version?


Return to “Flash”



Who is online

Users browsing this forum: No registered users and 1 guest