help with marble rolling game

Started by
1 comment, last by Norbo 16 years, 4 months ago
i am pretty much a newbie at game development but this seems like the most appropriate forum. i am working on a marble rolling game in XNA using the new BEPUPhysics engine and i am trying to get down the controls for the marble. right now i have a simple flat rectangular platform to test on and use the arrow keys to add angular momentum. this works relatively well, but there are minor problems with slipping, changing directions, etc. are there any tutorials on controlling marbles in this kind of game? (im going for Switchball-like behavior if anyone has played that) or (physics experts) which of these paramters might i play with? http://www.bepu-games.com/BEPUphysics/docs/interfaces.htm i have tried friction, mass, and angular momentum but never found a combination that seemed right. there seem seem to be tradeoffs between responsiveness and friction for start/stop and once im rolling.
Advertisement
Some sort of monkeyball/hamsterball physics? I suppose simply adding a linear force and / or a torque to the ball should work, as you say.

As for a more controlled movement, stopping and starting, which is a transition between static and dynamic friction models, it's not that easy.

If you want to consider an accurate friction model, you can look up the pacejka formula, that is used for car tyres. Then you can consider the ball as a tyre, with a desired direction directly taken from the controls to give you the 'slip angle' and derive longitudinal and lateral forces. That should be a lot more direct in terms of controls than a marble skidding around, but it won't behave like a marble.

Everything is better with Metal.

I'd love to hear about your experiences with the engine; if you want, you can post on the forums at bepu-games.com and I'll try to help with any questions you have.

Regarding this particular issue, modifying linear momentum directly as oliii mentioned in addition to, or perhaps instead of, angular momentum might work. With sufficient friction tweaking it might provide a little more direct control without appearing to slide before rolling, though I can see where it could be a problem if you don't want to be able to adjust your linear velocity while in mid-air.

This topic is closed to new replies.

Advertisement