I did not see a Network Replication Section to post this in as it is a big part, but I am curious how to calculate all the requirements to run 24,000 actors. For instance, an RTS game with 16 players and each player has a max of 1,500 units. I am not sure how to really explain this but here is best effort:
For an example, how would (if there even would be) I calculate the largest amount of data that I can replicate per Tick? In an effort to get an idea ■■■ to how simple or complex the units can get as far as the data the would be replicating? (This would vary obviously, but if I have a method of calculation, Icould use that to determine the number of simple actors, how many I could replicate, and what I would be left with for the complex actor and how many could exist at once).
I am also looking for ways to calculate how many projectiles could exist at once. A major factor would be anything requiring physics. Of course, there is always the idea of creating a somewhat custom physics engine that could be optimized in some sorts, but looking fo a general idea.
I imagine the network replication is going to be the trickiest part to handle if not the physics and path finding. I am trying o figure out the biggest bottlenecks in order of biggest bottleneck to lowest, so I can solve the biggest problem first.
Thanks for any leads, at this point I am just trying to see what to work out first. I already know this would be a huge undertaking…Challenge Accepted
Assuming every actor is moving the position update alone would be 4608 KB per frame (96bits * 24000Actors * 16Players).
If they update 10 times per second that is 2764800 KB (4608 * 10 * 60) or 2.7GB per minute.
So 2.7GB per minute just to keep one Vector updated on all Actors. Needless to say you need one hell of a server or optimization to make those numbers feasible.
RTS games with large number of Actors get around this limitation by using Lockstep instead of Authoritative Server. With lockstep every client simulate their own world and keep it in sync using the other players input. Lockstep is not easy since everything has to be deterministic to stay in sync.
There’s a very simple concept (not simple to implement) where a squadron of units, 100, 200, 500, etc: It’s actually 1 Actor which calculates locally behavior for its units as a “AI flocking” algorithm;
So the game usually only replicate 1:100 units.
That’s how new RTSs make “impostors” too (lod systems).
Yeah, I did a calc like this just to see what it would be like replicating a single 3 float vector. Thats what made me realize lockstep would have to be the way to go, or coming up with something like lockstep. I came across this interesting article Deterministic Lockstep | Gaffer On Games
I need to learn more about keeping things in sync. It would have been nice to have a dedicated server perhaps, so that players with lower end PC’s wouldnot need to run simulation and be able to play higher frame rate games. But now I see this probably wont be possible as there is too much data.
This is interesting, and good to know. I don’t understand however, how this would work? I have heard of games using something similar to this, wish I could recall titles, but they just did it as a visual effect. For instance, 1 Actor would have a group of 100-X animated units (think of civil war type groups of soldiers) and those individual units would be animated according to the action of the group, but would not be able to individually target seperate enemies etc. I am curious to learn more about the calculations of local behavior you mention.
I had a thought on the simulation part of things and replicating user input only and actor change of state. So, if each user was running the simulation locally, the server would replicate to each client user inputs (which on an RTS would be extremely low) and unit change of state (this would be higher than user input, but I assume still extremely low?). But I think I have a a decent idea of how to calculate data rates from when I took a look at calculating updating just a 3 float vector. Basically, determine the bits required for the data being sent such as how many bits for a boolean, how mny bits to track the unit id’s ofther units to update etc. So, if 24,000 possible unit ID’s that would be a short int in C++ which is 2 bytes yes/no? so if all units are updating in a single frame, at minimum it wouldtake 42kb + state change + user inoput? I would think most state changes would be booleans yeah? Would a boolean in UE4 be 1 byte or 1 bit?
Anyone have knowledge of full implementation of ECS in UE? Their are some devs working in Unity making “Sanctuary”, a sprititual successor to Supreme Commander, and they are able to get 10k units full simulation using ECS in Unity
That link is broken, however I have discovered someone developing a hybvrid ECS/OOP plugin (Apparatus in Code Plugins - UE Marketplace) which would be amazing. I hate plugins, as then I have to count on the dev updating plugin as I update UE throughout a long development period. I really wish Epic put the effort into doing a downright amazing and best possible integrated ECS into UE5. Heres to hoping.