# help with marble rolling game

This topic is 3859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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.

##### Share on other sites
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.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631428
• Total Posts
3000027
×

## Important Information

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!