Is NetCode usefull for a RealTimeStrategy game?

Hey there. I am getting started with Dots and ecs and wanna build an rts game.
I mostly use a workflow where i use Monobahaviours as components and do the “Convert and Inject GameObject”-conversion mode.

The Dots NetCode now seems to be developed with a arena shooter -like game - so a big difference to an rts game. My idea for the rts netcode is to use a server that syncs the simulation-relevant data to the clients.

Is Dots NetCode suited for that?

The current netcode package is intended for games using a server model with client prediction, which is very common in first/third person style games but it works for other types of games as well.

For RTS it is common to do lockstep deterministic simulation instead, so you just need to send the inputs to all clients then have all the clients run the exact same simulation. It saves bandwidth since you don’t need to send state for all units, and it saves server hosting cost since you do not need a server running the game simulation.

You can probably make that type of game work with a dedicated server model - it’s probably not even that hard to get something working if you just set all ghosts to interpolated - but bringing it up to the quality you need to ship might be hard.
Getting smooth results would require setting up distance based importance and/or relevancy - and even that might not be enough depending on the number of units you are expecting on screen.
Also keep in mind that unless you need it for cheat prevention or something similar it is probably overkill to have a server running the sim and server hosting is not free.

We are planning to look at a deterministic lockstep model in the future, but we have not started looking at that yet and I can’t say when we will.

1 Like