• entries
743
1924
• views
581868

# Untitled

115 views

Random Udo screenshot, not very interesting.

Seem to have found a solution to the problem I outlined last post. I've stopped floor()ing the vertices before I render the sprites, which has removed the major jitter.

The new jitter was being caused when you pushed into a solid object from the left side and was basically due to the fact that as a small amount is gradually added to your velocity, until it actually passes the pixel boundary, no collision is registered with the object.

Say that at X=33, you collide with a object, but you are standing at X=32. As you hold left, the following would happen:

X=32.23; // no collisionX=32.84; // no collisionX=33.23; // collision

On the last turn, the collision system kicks in and sets the character position back to X=32.

Direct3D seemed to be taking the fractional part into account where my collision system was not.

Simply solved - if the X velocity is >0, add 1 to the X component of the client collision rectangle.

Now I've got rock solid again, with no jitter, variable framerate but fixed rate physics and no need for that silly hack I had before where I abandoned interpolation if the distance between the previous and current position was less than a pixel.

I've also stolen the GUI system from Pod and plugged it into Udo. Looks just as nice and it's mine so I may as well make use of it.

And as if I didn't have enough problems, my refrigerator has just thrown a division by zero exception.

It's Comet, but without the stupid mark-ups and delivery to your door.

Quote:
 Original post by ukdm Laskys It's Comet, but without the stupid mark-ups and delivery to your door.

[smile]

Thank you, but I think I'll probably just move the magnetic numbers.