So what would be the best way to achieve a slow-motion/bullettime effect (Max Payne, the Matrix, etc)? Should I consider modifying the source to take varying step intervals as mentioned in the manual, or would it be better to just call Step half as often? I think there are a couple of ways of doing this, and I was wondering if anyone had done anything similar.
Slow Motion / Bullettime Effect?
General DiscussionWith 1.4.3 you should store the positions and interpolate. In 2.0 you'll be able to use a smaller time step.
So, Erin, will 2.0 feature variable time steps?
Yes that's what he means, you'll be able to switch to a smaller time step.
Saaaaahwwwwwweeeeeeeeeeeeeeettttttt!!!!!!
(my approval... in bullet time... of course... 😛)
(my approval... in bullet time... of course... 😛)
Thanks for the info.
--Am I correct that what is in SVN is the current build of 2.0? I may just grab that and throw caution to the wind, since my game won't be done for awhile and finding 2.0 bugs at an early stage can only help.
--Am I correct that what is in SVN is the current build of 2.0? I may just grab that and throw caution to the wind, since my game won't be done for awhile and finding 2.0 bugs at an early stage can only help.
Yes, but the way I understand it, if you run into errors in the SVN version it is possible that they are because it is just incomplete and it's not necessarily even a bug. Sometimes he makes helpful comments like the recent one about the contact list not being usable in revision 87 or 88 I think it is. This is because of a change in how the contact list works because of the CCD code, so with things like that you may have to skip a few revisions occasionally or you may find your game broken 😮
I think at least one person (kdmiller) is using revision 87 (see Shmup thread) and it seems to work well enough. Just as long as you don't have any deadlines to meet you should be fine.
I think at least one person (kdmiller) is using revision 87 (see Shmup thread) and it seems to work well enough. Just as long as you don't have any deadlines to meet you should be fine.
Nope, nothing but self-imposed deadlines on this one. I hope to publish this one late this summer, and maybe stop working for The Man and make my own money for once. 🙂
I've updated to revision 88, though that one is pretty much just an internal cleanup cleanup.
The big change with the latest version is you can no longer loop over all contacts after the world step to harvest collisions because the world now removes them immediately instead of waiting a step. As a result, you have to set up a b2ContactListener to receive collision notifications, but the newest versions (87 and 88) make that a lot easier than previous revisions.
My game has somewhat atypical usage patterns:
I figure I abuse Box2D heavily in some ways yet go easy on it in others, but it's held up well.
The big change with the latest version is you can no longer loop over all contacts after the world step to harvest collisions because the world now removes them immediately instead of waiting a step. As a result, you have to set up a b2ContactListener to receive collision notifications, but the newest versions (87 and 88) make that a lot easier than previous revisions.
My game has somewhat atypical usage patterns:
- top-down perspective (zero gravity, few resting contacts)
- unusually-large numbers of bodies (peaks of 500+)
- numerous fast-moving bodies (bullets)
- frequent addition and removal of bodies (rapid-fire weapons, exploding enemies)
- fairly exclusive category collision masks (e.g. bullets ignoring bullets and teammates)
I figure I abuse Box2D heavily in some ways yet go easy on it in others, but it's held up well.
Original thread: https://box2d.org/forum/viewtopic.php?t=318