the second script cannot work:
if key w is not pressed (!key_w), your player will move 20Q
coincident if key s is not pressed (!key_s), your player will move -20Q
This combination cannot work. Which kind of movement do you want? The movement does not seem to be functionally!
while (1)
{
if (key_w)
move_var.y += 20;
if (key_s)
move_var.y -= 20;
}