in reply to pong paddles are not going equally fast
New paddle position also depends on $step which is the time slice.
When you press UP-arrow this checks only the 1st condition. When you press DOWN-arrow it checks both conditions. Could that be affecting $step? Ideally no but try print $step and see.
if($event-> key_sym == SDLK_UP){ $player1->{v_y} = -2; } elsif($event->key_sym == SDLK_DOWN){ + $player1->{v_y} = 2; }
bw, bliako
In Section
Seekers of Perl Wisdom