Another question is: If I have a lot of rendering animation, how do I submit them to the queue.

Normally, you separate in two functions :LOGIC (game logic) :- runs 60 times per second (for example)- takes user input into account- takes all decisions- performs "physics" : Every execution of the function models what happens in 1/60 second- selects the current image of animations (ex : Run loop, images 1 2 3 4 1 2 3 4...). The information needs to be stored in memory, not drawn.- is the one that creates and deletes game elements (bullets,...)- can start sound effects

DRAWING- only needed after a logic step has run- can be done after several logic steps if the computer is too slow (it is called frame skipping)- only places graphic elements on the screen

When you have this separation, all the code in logic is fast. You can then use a timer event at 1/60s to run logic, and every time the event queue is empty, you can call the draw function to update the screen.

keprast

THANKS!Belated thanks.

Some things make me unable to appear for some time.

Chris Katko

I agree though even as a 1st language English user, that the docs are really confusing on that subject and I almost always have to re-lookup my old code, or grep though examples, to find the answer on how to do custom events, as well as "multiple events of the same time in one queue" (telling them apart).

Who is up for making an Allegro 5/A.CC FAQ? If you could come up with Q's, I'll start preparing either a Wiki or YouTube walkthrough of the answers...

I'm trying to get disciplined again (::boo:: health problems) and maybe forcing myself to do one a week could help me be more productive...