Remember to use floating-points instead of integers as coordinates for your objects. Temporarily convert the coordinates to integers when you draw them.