Physics Engine Development
The Captain
Posts: 60
With the release of the Hydra last week, I thought it would be proper to share my idea with the community. I have always been fasicanted with games, exspecially those with realistic physics. I want to develop a physics engine for people to use.
I have read many a books on physics engine design and development but they only explain theory , there's no actual code displayed. However I can understand the pretty pictures and am able to code what is displayed.
I will be receiving my Propeller Demo Board Kit along with the Hydra Book as my Christmas present to myself. After that, it's only a matter of time before I lay down the foundation for the engine.
Post Edited (The Captain) : 7/23/2007 4:32:28 PM GMT
I have read many a books on physics engine design and development but they only explain theory , there's no actual code displayed. However I can understand the pretty pictures and am able to code what is displayed.
I will be receiving my Propeller Demo Board Kit along with the Hydra Book as my Christmas present to myself. After that, it's only a matter of time before I lay down the foundation for the engine.
Post Edited (The Captain) : 7/23/2007 4:32:28 PM GMT
Comments
Andre'
Andre'
Paul
Vector
Newtonian Mechanics
Angular Momentum
Forward Euler
Backward Euler
Modified Euler
RK2
RK4
Verlet
If you know how to add acceleration to your motion graphics, then adding springs is easy. Setup tx and ty for your object and then calculate your acceleration based on how far you are from the target e.g. The farther away you are from your target, the faster you should accelerate.
So if you have dx = (tx-this.x), scale it down by some spring value and add this to your acceleration and you should be good to go!
ax += dx*spring // Spring is a value from 0-1
vx += ax
obj.x += vx
Something like that... anyway, hope that helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Lewis [noparse][[/noparse]m80] -
Check out Jed Margolin's web site http://www.jmargolin.com/. He was one of the key programmers for the Battlezone video game. I am always amazed by how much they did with so little hardware. His web site has several articles on the math he used.