Earlier quoted context omitted.
All games have minimum requirements.
Yeah, in the perfect world all your buyers will have them. In real life sometimes don't. Plus there is a lot of things you don't know; maybe he haves the minimum requirements but he is running a lot of background process because he installed a bunch of things he doesn't use.
Doing Game Gravity Right
21–30 of 86 posts
Re: Doing Game Gravity Right
#22Re: Doing Game Gravity Right
#23you are still doing it wrong. dt should not be affected by framerate. http://gafferongames.com/game-physics/fix-your-timestep/ use an accumulator to have a fixed dt no matter the framerate. With a variable step size you risk all kinds of weird bugs linked to the hard to debug rendering context. The size of dt should be consider a system parameter, tuned for your game and fixed in concrete .
The whole point of dt is to deal with variable framerate.
Re: Doing Game Gravity Right
#24This is still Euler integration, which has poor accuracy whenever the derivative varies with time. The standard numerical integration method is 4th order Runge Kutta. RK4 is also popular for solving many forms of differential equations. A good summary is here: http://gafferongames.com/game-physics/integration-basics/
Re: Doing Game Gravity Right
#25What id don't understand is, wouldn't this be only half more correct? I'm not really sure if my question makes sense.
Re: Doing Game Gravity Right
#26Re: Doing Game Gravity Right
#27TIL that I have been doing acceleration calculation all wrong over the years. Thanks for the insight.
Re: Doing Game Gravity Right
#28Re: Doing Game Gravity Right
#29Udacity has a course, "Differential Equations in Action", that's about numerical solutions of equations of motion and other differential equations from physics, biology, and so on. http://www.udacity.com/overview/Course/cs222/CourseRev/1
Anyone has any insight into the strenghts and weaknesses of each one? I've been unable to find any comprehensive review online about them. I don't have time to do both simultaneously, but can do one first and the other later or alternate between them.
I don't have a strong calculus background though I'm above the average "programmer" or compsci graduate. I'm interested in simulation and numerical problems (specially finite element method) but theoretical background is welcome when its not overwhelming (i.e. when its there for you to understand but its not the focus of the course).
Re: Doing Game Gravity Right
#30The algorithm (reversible RESPA) is formally derived from the Liouville operator (which governs the time evolution of any property):
A(t) = exp(iLt) * A(0)
For instance, A(t) can be position or momentum. The Liouville operator must be symmetric in order to generate a reversible numerical integration algorithm.The result of all this is basically that:
p(t + ∆t/2) = p(t) + ∆t/2 F(r(t))
r(t + ∆t) = r(t) + ∆t p(t + ∆t/2)
p(t + ∆t) = p(t + ∆t/2) + ∆t/2 F(r, t + ∆t)
where p is momentum, r is position, and F is force.