BlindTerran / JayWalk_Processing

A 2D interactive game made with Java Processing library
MIT License
1 stars 0 forks source link

Incorrect pedestrian moving speed #3

Open BlindTerran opened 2 years ago

BlindTerran commented 2 years ago

The issue occurred when moving up and down instruction is executed the pedestrian is moving at an incorrect speed. The pedestrian is moving instantly off the screen when a specific key is pressed, I dig into it and finds that every single keypress is executing multiple move instructions which cause the pedestrian to move at multiple times of the speed. Ideally, the pedestrian can only move to a specific distance which is the height of a lane on a single keypress.

BlindTerran commented 2 years ago

Try halt move execution at each draw cycle

BlindTerran commented 2 years ago

Outstanding issue: KeyReleased() will only be called when a key is released which result in delayed response when a move key is triggered.