Well yeah that depends on the scale of the game, but if you look at a lot of multiplayer games which are real time and use physics engines, like shooters for examples, they don’t have a lot of physical objects or things that need to be CSP’d. Quake, Counter-Strike, MOBA games, and pretty much every multiplayer game I can think of. Heck some of them don’t even use physics engines (or only for client side effects). The point is that it isn’t a new problem, and all mutliplayer games deal with it.
Another way around re-running the whole simulation is to have kinematic body for the player with custom movement, so you can reapply inputs only on the player object.
Or maybe your game doesn’t even use rigid bodies for the players, or at all (e.g. real time strategy games).
For things which don’t need to be predicted accurately you could have complete client side simulation. And it goes on…
The problem with implementing CSP with the existing Network system is that you need a complete state snapshot. For example you can’t use delta updates on the predicted state, because the predicted state might be wrong and the whole point of sending the state is to correct it (If you’re 100% deterministic you don’t need to send anything for the most part, deterministic lockstep).
A possible way around it is to maintain two states, CSP state and replication state. the replication state gets replicated as it does in Urho but does not affect the scene, just sits in the background so the CSP can copy it each frame and perform a prediction on it, and the CSP state will be the one used by the scene. As long as Urho’s network updates create complete, or maybe at least near complete snapshots of the server state, the client will be able to predict it accurately enough.
If you want to give this approach a try that would be great if it works, it will enjoy Urho’s already existing network efficiency, and won’t change the API that much, probably just adding PREDICTED to LOCAL and REPLICATED.
(For now I spent way more time than planned on the CSP thing and I need to move on with my project, so I’m not going to try it)
The most important thing to keep in mind is that it’s better to have something that doesn’t scale well than something that doesn’t work at all. It’s nice and dandy to have a car that uses 90% less fuel but if it doesn’t have wheels it won’t get anywhere.
Without client side prediction real time games over the internet aren’t an option, and that’s a much much smaller possibility space than games that can handle the overhead. CSP is essential.
Well I hope it helped to convince you that CSP is a must, and if it didn’t try to think about multiplayer games you know and ask two questions:
Are they playable over the internet without CSP?
Can they handle the overhead of CSP?