We press the forward arrow. The event handler understand that the character must go forward. The event handler write in the video-eng register to draw a pass of the character. In the audio-eng register we write the istruction to play sound of 1 pass. The video-eng read his register and draw the character moving. At the same time the sound-eng plays the step.
If one istruction reach timeout the register handle will add this istruction to the next (for example if the video-eng can't draw one step and arrive the order to draw another then the register handler write 2 step instead of one)
We press the forward arrow. The event handler understand that the character must go forward. The event handler write in the main reg that video eng must draw the character making one step and the sound eng must play one step. The reg handler tell to video-eng and sound-eng what they must do.
This can be an idea on how the engines are structured:
Crystal space is the actual 'i/f engine' but we can use sdl or some other existing engine.
(Powered by PWP Version 1-4-3 )