• Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


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 collision
X=32.84; // no collision
X=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.

Sign in to follow this  


Recommended Comments

Original post by ukdm

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


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

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement