Adding multiplayer after the fact to a game may be infeasible. It’s a good idea to think about multiplayer from the beginning. However, not all the details need to be thought out from the beginning. With good preparation adding multiplayer can be made much easier.
- Use a fixed timestep update for all game logic (physics, timers, etc.) to ensure determinism.
- Separate game logic state from visual rendering so the logic can run headless.
- Implement copy/serialization for game state and input buffers to allow rewind and replay.
- Ensure game logic can run faster than real time to support state replay during networking.