A workable structure for physics?

Started by
12 comments, last by MrTwiggy 13 years ago

When you are controlling player movement, I'm assuming you add a force to the player, correct? Which causes an increase in acceleration, and thus an increase in velocity and position. However, how do I limit the input force, but not the external forces? (Such as riding a train) Because, in these games, the players accelerate, and then they reach a maximum speed. But how do I enable that effectively for the input speed?

EDIT: Also, does anyone know any good tutorials or guides that go in-depth with a 2D rigid body dynamics physics engine? I have found some, but they are almost all in C++, and the inner-working of C++ seem to complicate everything even further. So hopefully something that is either not language specific, or is C# or XNA specific. Thanks.


Did you see my article Physics engines for dummies? Might give you some pointers :)

http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/


Cheers, Paul.
Advertisement

[quote name='MrTwiggy' timestamp='1302174244' post='4795464']
When you are controlling player movement, I'm assuming you add a force to the player, correct? Which causes an increase in acceleration, and thus an increase in velocity and position. However, how do I limit the input force, but not the external forces? (Such as riding a train) Because, in these games, the players accelerate, and then they reach a maximum speed. But how do I enable that effectively for the input speed?

EDIT: Also, does anyone know any good tutorials or guides that go in-depth with a 2D rigid body dynamics physics engine? I have found some, but they are almost all in C++, and the inner-working of C++ seem to complicate everything even further. So hopefully something that is either not language specific, or is C# or XNA specific. Thanks.


Did you see my article Physics engines for dummies? Might give you some pointers :)

http://www.wildbunny...es-for-dummies/


Cheers, Paul.
[/quote]

Hey. Yeah, I actually did. It's really well done, but unfortunately the C++ portions of it clouded it a bit too much for me to get enough out of it, just because I don't understand the inner-complexities of the actual C++ language. Really great thing though.

Hey. Yeah, I actually did. It's really well done, but unfortunately the C++ portions of it clouded it a bit too much for me to get enough out of it, just because I don't understand the inner-complexities of the actual C++ language. Really great thing though.


The code snippets and examples are actually written in flash :)

[quote name='MrTwiggy' timestamp='1302211882' post='4795670']
Hey. Yeah, I actually did. It's really well done, but unfortunately the C++ portions of it clouded it a bit too much for me to get enough out of it, just because I don't understand the inner-complexities of the actual C++ language. Really great thing though.


The code snippets and examples are actually written in flash :)
[/quote]

Ahh xD I just figured it was really complicated C++, haha.

This topic is closed to new replies.

Advertisement