Thanks for the answer !
[= Sweeney;275708]
This is a question that has been raised in every generation of the Unreal Engine, and it is definitely not in the works. Lock-step execution can only work if every engine system on every platform is designed for absolutely deterministic execution. Thatâs not the case with UE4, as a big engine with a time-dependent game update model and reliance on a wide range of middleware and a wide range of platform and runtime OS-version and API-dependent optimizations. An engine could be designed this way, but UE wasnât, and itâs not practicable to retrofit it for a special usage case.
[/]
And this also means itâs not really possible, even for AAA developers, to implement this in UE4.
[= Sweeney;275708]
Instead of lock-step determinism, I recommend working with the engineâs network replication framework. This code has fairly good performance and typical internet connections have plenty of bandwidth, so I expect it to be practical for RTS usage.
[/]
Thanks for your ârecommendationâ, itâs just the only option we can choose :rolleyes: Itâs nice to hear you think itâs practical for RTS usage, but most people I have talked with about this topic said itâs not possible to create a RTS with thousands of units with replication. I have not tried it yet since I think itâs hopeless.
[= Sweeney;275708]
Also keep in mind that you can customize the engineâs relevancy checks (which determine whether a given object is replicated to a given client) based on the clientâs view of the world, which will usually change fairly slowly in an RTS.
[/]
RTS games usually have a small minimap where you can easily jump immediately to the opposite site of the map with just one click on the minimap. So the clients view can change really fast.
However, I remember this post from an Epic developer (April 2014):
[=John Pollard;9907]
- Send RPCâs from each client to server as they take turns to feed their input into a simulator that only runs on the server. Then use standard actor replication to each client, so they see whatâs happening.
This would give you more room to decide if the simulator needs to be deterministic or not and easier to support late joins.
-
Send RPCâs to server for each move, then forward these moves back to each client via multicast RPCâs. This would require a completely deterministic simulation running on all machines. It would also be more difficult to support late join. There wouldnât be any major engine modifications though.
-
Same as 2 except send RPCâs to all other machines in full mesh/lockstep fashion. This is probably the closest to the original lockstep model seen in doom but also the one that would be the most difficult and least flexible option. You would need to make some modifications to allow full mesh RPCâs for example.
#1 would be my vote as the engine would nicely support this, late joins are possible, and wouldnât force you to use a deterministic model. You could still lockstep turns if you wanted but you donât really need to do that either.
[/]
I find most interesting that he said option 2 would not require âany major engine modificationsâ while it would be âcompletely deterministicâ. This is virtually the opposit of what you said, . Who is right now? Well, you are the âMaster of UE4â so you are probably right, but I just want to have some hope