# Box2D Forums

 It is currently Sun May 19, 2013 10:46 pm

 All times are UTC - 8 hours [ DST ]

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: TimeStep problemPosted: Wed Apr 04, 2012 3:42 am

Joined: Mon Mar 19, 2012 11:34 am
Posts: 7
Heya, we are a group that are creating a game using box2D, duh.
We have encountered a little (big) problem.

Out avatar can shoot a string out from its arm, with a set distance, just like a rope.
When we start the game everything runs at normal speed. But as fast as we shoot out our rope (60 bodies, every body is like 0.5f, 1.0f sized.) the framerate just drops. The chain that hangs from the ceeling starts to sway way slower and everything else that is in the game starts to act slowly. We are currently studying game programming at the university and we asked our teacher about it. He said that we shouldn't have to alter the timeStep and iterations. Should do that automatically. But something is wrong.

Anyone have any idea what it can be?

Cheers.

Top

 Post subject: Re: TimeStep problemPosted: Wed Apr 04, 2012 3:46 am

Joined: Mon Mar 19, 2012 11:34 am
Posts: 7
Just tried a release build, still slowing down a little bit (not much at all) but way way better.
Still need someone to tell me if it's necessary to alter the timeStep, iteration etc.

Like one of our programmer in our group need to have timeStep = 1.0f/15.0f to work at normal speed.

Top

 Post subject: Re: TimeStep problemPosted: Wed Apr 04, 2012 8:18 am

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1515
Location: Tokyo
Does the speed recover after the rope has extended?
Do the bodies of the rope collide with each other? If they all start in the same place it could slow things down. You could set the filter for the rope segment fixtures so that they don't collide with each other.

If the speed does not recover after the initial firing period where the rope segments are overlapping, maybe there are just too many bodies in the rope.

Top

 Post subject: Re: TimeStep problemPosted: Thu Apr 05, 2012 11:15 pm

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
^^ turn off collision between the rope bodies. Use the collision filter bits.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC - 8 hours [ DST ]

#### Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: