Just looking at what other people have done, what's been successful, and what pitfalls to avoid.
- Game update is variable update time
- Game update and rendering done in CADisplayLink callback running on main thread.
- Audio update occurs on separate thread controlled by AudioUnit.
- (Game-specific context): Game update takes ~5ms to complete
- I feel like variable-time game update might be OK on mobile given we don't have to worry about being preempted as much.
- Don't know if this is how CADisplayLink is designed to work - perhaps should run game logic on background thread and only render in CADisplayLink callback? Not sure what synchronization issues arise here. Game logic could be allowed to update as fast as possible - or could cap to screen refresh rate.
- Similarly, could push rendering into same background thread as game update. Again, not sure what synchronization issues arise here.
Goals (The same as everyone else?):
- Minimize input -> display latency
- Every screen refresh, the device should have an new/updated frame buffer to display.
(Placed in Graphics Programming and Theory because of CPU/GPU synchronization issues - of which I am most uninformed)
Edited by zokeefe, 30 July 2016 - 04:28 PM.