Jittery Collision Response with Delta Timing

BlitzMax Forums/BlitzMax Programming/Jittery Collision Response with Delta Timing

297Chrisc(Posted 2007) [#1]
I've been working on a very simple beginnings of a platformer which has been going ok until I started looking into the whole delta timing thing. I've setup a Bounding box type that handles creation and collision detection against them, the detection and response code worked great until I added delta timing. Now when the "player" rectangle object collides with the "floor" bounding box it jitters around. I've tried a few things to get it smooth again but I'm not having much luck.

EDIT: If someone would like to point out the syntax for a code box in a forum post since I can't seem to find any info on the topic.

This is the code for the Bounding Box type:


And the code for the Delta Timing:


And finally the code for the actual program:



tonyg(Posted 2007) [#2]
forum codes


297Chrisc(Posted 2007) [#3]
Thanks tonyg! Much more readable now.


tonyg(Posted 2007) [#4]
Try fixed rate logic like this . It's more suited to collision/physics games.


297Chrisc(Posted 2007) [#5]
Excellent! Fixed rate is much better, thanks again tonyg.


MGE(Posted 2007) [#6]
Yes. Even though I've coded delta time in platformers, never again. Fixed timing is the way to do. ;)