Hi Jack,
The problem is that an SDL::Rect stores it's x and y coordinates as
integers. When you subtract a small value from the coordinate the new
coordinate is truncated, which is why you are able to move in negative
directions. When you add a small value the same thing happens, but the
truncated value is the same as the value you added to, so no movement. To
work around this, store the coordinates in variables outside of the rect,
add and subtract using these variables, then update the SDL::Rect
coordinates.
Jeff
--
Jeffrey T. Palmer