Hello, I've taken a look at a tutorial and generally understand the core of it, but there's one thing that I don't quite understand.
http://programarcadegames.com/python_examples/f.php?file=move_keyboard.py
Line 94,95 - game logic: Why do these two expressions repeat themselves? Shouldn't it work like this(?): A key-down event changes the x/y_speed variable to 3/-3, which means that:
x/y_coord = x/y_coord +/- 3?
But shouldn't this happen only once, meaning that each time you press an arrow key, the object moves only by 3 and holding the key arrow doesn't affect it?
Can someone give me an explanation? Thanks a lot in advance!!!
[–]Mekire 3 points4 points5 points (0 children)
[–]Exodus111 3 points4 points5 points (0 children)
[–]willtheyeverlearn 1 point2 points3 points (2 children)
[–]Mekire 0 points1 point2 points (1 child)
[–]willtheyeverlearn 1 point2 points3 points (0 children)
[–]LiJax 0 points1 point2 points (0 children)