How should a good game loop looks like ?
I mean I've got something like:
but let's assume that game logic takes time, lets say 1/4 second. If in that time user press a button or generate any other event it'll be missed ?
Or the event will be generated and will set get_event on true next time al_wait_for_event will be executed?
lets say 1/4 second
That is an extremely long time for most game loops. Most likely your game loop will take less than 10ms to execute.
Or the event will be generated and will set get_event on true next time al_wait_for_event will be executed?
The events will sit in the queue until you get them out, so to answer your question, yes.
]]>after testing couple of function I guess that al_wait_for_event_until(...) is best option, right?
]]>There is an example on the wiki somewhere, but this is better than using a timed wait because it always waits until there is an event, processes all the remaining events, and draws when the timer goes off :
]]>