Jump to content
  • Advertisement
Sign in to follow this  
xsirxx

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

This topic is 5119 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!