Problem with Pygame movement acceleration, platformer game [duplicate]
问题 This question already has answers here : Pygame doesn't let me use float for rect.move, but I need it (2 answers) Closed 7 days ago . When i move right using the right key, i accelerate to a max speed. When i release it, i do decelerate to a stop so that is fine. However, when moving left using the left key, and after releasing it, i continue moving at a fixed speed and then come to an abrupt stop after a short while. Any idea what could be wrong with my code? The original code is from http:/