So I was not sure how to structure this title, feel free to edit it.
My question is:
When I have a Game Loop, I have 3 main blocks. Handle Events, Update game state, and draw.
Let's say for example I check for keyboard/mouse events, and I want to move my character when buttons are pressed.
KEYDOWN event occurs, should I immediately call
Or should I toggle
move_left/move_right bools, and then call
Player.move when I'm in the Update game state block.
I was wondering this becouse, for example a function performs a long algorithm and I call it when an event occur's, calling the function will take some time, and meanwhile I might press more button's/events. I think I will lose some of those events becouse in that time the algirthm function was runing.
Or, I can toggle a bool when the event occurs, and after checking for ALL events, I perform functions based on the bools.
PS: Feel free to edit this post in a more constructive question.