Skip to main content
8 events
when toggle format what by license comment
Sep 12, 2014 at 2:11 comment added BungleBonce Hi @WilliamMorrison, Oh - :-( I thought I was interpolating already as I'm using my current and previous positions. I'm confused :-0, would you mind explaining this a bit more over at my other question? Would be a great help :-) It's here: gamedev.stackexchange.com/questions/83230/… Thanks!
Sep 12, 2014 at 2:01 comment added William Morrison Not quite. You're actually extrapolating right now. You take the most current data from simulation, and extrapolate what that data looks like after fractional timesteps. I'm suggesting you interpolate between the last simulation position, and the current simulation position by fractional timesteps for rendering instead. Rendering will be behind the simulation by 1 timestep. This ensures you'll never render an object in a state the simulation didn't validate (ie. A projectile won't appear in a wall unless the simulation fails.)
Sep 11, 2014 at 12:37 comment added BungleBonce Yeah it's a tricky problem to resolve. I have asked a separate question regarding this here gamedev.stackexchange.com/questions/83230/… if you want to keep an eye on it or contribute something. Now, what you suggested in your comment, am I not doing this already? (Interpolating between previous and current frame)?
Sep 11, 2014 at 3:46 comment added William Morrison In my games yes, that's what I do. Please be better than me, dont do that, it is not the best solution. It complicates render code with logic it shouldnt be using, and will waste cpu on redundant collision detection. Itd be better to interpolate between the second to last position and the current position. This solves the problem as you're not extrapolating to a bad position, but does complicate things as you are rendering one step behind the simulation. Id love to hear your opinion, which approach you take, and your experiences.
Sep 11, 2014 at 1:09 comment added BungleBonce Just curious @WilliamMorrison, using these throw-away coordinates, how would one mitigate the problem of sprites being draw 'embedded in' or 'just above' other objects - the obvious example, being solid objects in a 2d game. Would you have to run your collision code at render time also?
Sep 6, 2014 at 16:48 comment added BungleBonce Excellent @WilliamMorrison - thanks for confirming this, I was never really 100% sure that this was the case, I now think I'm on my way to getting this working to some degree - cheers!
Sep 5, 2014 at 23:33 review First posts
Sep 6, 2014 at 6:22
Sep 5, 2014 at 23:32 history answered William Morrison CC BY-SA 3.0