tynet-lichat/shirakumo - IRC Chatlog
Search
20:39:53
shinmera
this last part of making things work has been some of the most frustrating debugging I've ever done
20:42:20
shinmera
it helps that the math here is actually pretty simple, and that I just copied a reference implementation for the most prat.
20:42:42
shinmera
if I had had to come up with it all from scratch I probably wouldn't have been able to do it.
20:45:16
selwyn
i don't like that there is no way to specialise integrate on an integrator argument (that could have internal state associated to it)
20:47:12
shinmera
since you need to be able to get access to the acceleration change, which would require changing shit in the resolution, too.
20:47:38
selwyn
but i also don't know what these changes are for, or how sophisticated you want to make things
20:47:51
shinmera
I am extremely skeptical that RK4 would ever actually be benefical for game physics.
20:50:25
shinmera
I would have to be convinced that the tradeoff of complicating (and expensifying) the interface would be worth such a remote chance.
20:57:40
shinmera
Like, the chance of not just having that implemented, but having that implemented *simultaneously* with the old integration scheme.
20:58:01
shinmera
I wouldn't be opposed to changing the integration scheme if it can be shown that it's a good tradeoff.
21:01:35
selwyn
the problem is that euler integration usually does not exactly preserve quantities that ought to be preserved
21:07:53
shinmera
I didn't say anything because Verlet is also called 2nd-Order Euler, so I wasn't sure if you were just abbreviating.
21:11:41
shinmera
Anyway, that second term is going to be extremely small almost always, since we have a default timestep of 0.01, so 0.0001*a.
21:12:04
shinmera
And at that point I'd be more concerned about floating point precision, since everything is still stuck with single floats.
21:12:21
shinmera
So if I were you, and worried about accuracy, I'd get to work on that 3d-vectors/etc. rewrite, first.
21:14:30
shinmera
floating point errors compound, too, and those are also gonna inject and remove energy.
21:16:30
selwyn
even for 'precision' physics you don't need to take floating point into account unless your scales are wildly different (which they shouldn't be)
22:27:03
shinmera
there's small deviations from the reference implementation that are due to floating point precision errors accumulated from the differences in implementation of the matrix stack.
22:27:37
shinmera
at least, as far as I can tell. I haven't compared to a doubles version, since switching to doubles is non trivial.
23:10:43
Colleen
I'm surprised that switching float width is a non-trivial change. Are you relying on the bit-representation of the floats or something?
23:10:43
SAL9000
I'm surprised that switching float width is a non-trivial change. Are you relying on the bit-representation of the floats or something?