2 ms·
An "engine" could take care of synchronizing rendering with reading, but the difficult part is application specific: ensuring that rendering fits in the specifi
by HelloNurse 8y ago
An "engine" could take care of synchronizing rendering with reading, but the difficult part is application specific: ensuring that rendering fits in the specified number of CPU cycles.
- ddingus 8y agoFor many cases, one ends up writing a little kernel that manages the display. Break the display into whatever elements make sense, and insure timing is all sorted. Run tests to get maximums. Once it is running, the rest feeds it with pointers to objects, and lists or the objects get generated dynamically at display time. Various schemes apply to overtime requirements. In old Williams arcade games, one method was to just move baddies to a non displayed region. Aggresive players would fire off a ton of shots to trigger this. Another is to delay animation or movement. The kernel can do that, but it gets more complex and slow. Dumber kernels are faster. Higher level code can manage what the kernel has to do. One thing is smart to do though, and that is to have the display kernel fail gracefully. Use hardware timers, or loop counters to prevent overdraw and the loss of display sync normally associated with that condition.