Sign in to follow this  

Building a Physics Engine: Input on how things should be done?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is a basic idea thread relating to Physics engines. I currently have physics in my game and I place them in areas where each entity relys on that certain physics. So the question is, How do you build your physics engines? Do you place them in a class on its own? How do you arrange each relation? How do u extract what you need? --I ask this because Im looking at rebuilding my engine but I want a robust easy to modify and easy to reuse for other games type of setup. Say you were to make a sequel with a new engine but want same physics...? So general Ideas on how you do yours would be REALLY appreciated! Thanks much. --Brad

Share this post


Link to post
Share on other sites
A good idea is to look at others physics engine interface.
Have a look at
- ODE http://ode.org/
- Tokamak http://www.tokamakphysics.com/
- MrRowl work http://www.rowlhouse.co.uk/jiggle/index.html
for exemple

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What you could do is create a chart. Start with the main part; physics. Then break it down to more specific areas like natural physics like gravity and unnatural physics like objects.

Share this post


Link to post
Share on other sites
Yeah definately take a look at ODE. Check out the tutorials to understand how ODE's interface works.

Btw if you are planning to write your own complete full scale physics engine (simulator), don't bother unless you have a lot of time on your hands. Just use ODE or any other ones. If you are just making a simple one than you should be fine.

Share this post


Link to post
Share on other sites
Well I have never used another physics engine, So yea im only going to write what is essential to my game. I have alot of code in already for flight model and projectile and so fourth... Yet Its kind of cluttered, they are placed in each area's own physics section. So my idea was to put it all together, and with what some of you said was place the gravity stuff you will use alot together, that makes since. Ill think about it some more, just wondering what the majority has done. Whats the best idea if you dont want to use someone else's physics. Thanks,

--Brad

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this