First of all, thanks to Tobias Leech for so quickly answering my previous 
question on alpha values.

Now, I'm trying to understand movement.  I managed to hack together a simple, 
choppy, "movement by teleportation" app in which one can use ASDW to move a 
rectangle around in the screen.  However, inspired by the Pong code in the SDL 
manual, I'm trying to recreate this properly by using motion handlers.  The 
resulting code is at http://pastebin.com/mVHANk7T

The strange thing about it is that movement works just fine, but only up and to 
the left (ie via A and W) not to the right or down (ie via D and S).  I'm at a 
bit of a loss as to what's going on...why would a negative x-velocity and 
positive y-velocity be fine, but not a positive x-velocity or a negative 
y-velocity?  I know that the correct velocity values are being set (by 
de-commenting the debugging print statement and running the code), so it's not 
an issue of the wrong velocity values being set...  Is there something obvious 
that I'm missing here?

Thank you for your time,


Reply via email to