A new system called Dynamic Simulation has been sitting on Dev-Branch for some time. In short: it's a tool that can be used to selectively control object and unit simulation based on player and enemy presence. Due to the nature of the system, it cannot be used everywhere on everything. Some scenarios might heavily profit from Dynamic Simulation, whereas some might not be able to use it at all.
The Dynamic Simulation is still in the testing and tuning stage. Its core functionality is done, along with the Eden Editor implementation. It is now being tested and tuned in real scenarios. To get more information about the system, how it works, how to set it up and how to properly use it, please refer to the documentation: HERE
We would gladly welcome constructive feedback, so please read the documentation, give it a try, and share your notes. If you can provide real use-cases of Dynamic Simulation (i.e. attaching a mission where you are trying to use it), it will greatly increase the overall feedback value.
Thanks,
Bohemia Interactive, Team Mike
It is sorta same as enableSimulationGlobal. It is done on the server and propagated to every client. It doesn't use hideObjectGlobal approach, as hidden objects do not have collisions and that would create a lot of issues in situations where there are objects stacked on top of each other and the bottom gets disabled by dynamic simulation. Same is true for a vehicle that would loose collision and another vehicle will park on its spot. When the vehicle would be re-enabled, the collisions would re-initiate..
To make the system works and nets some performance increase we needed to make sure, that the overhead caused by the processing of units and objects around each player will be as low as possible. Imagine you have a scenario with 400 units, 3000 of objects and 16 players. You really cannot handle this properly from script using a distance comparison method. The grid system due to its nature (being grid, resp. multi-level grid) and the fact it runs in engine on separate thread (to prevent any simulation slowdown), it allows us to process large number of units and objects lightning fast.
Unfortunately we cannot add the visibility checks, they are too expensive. It would defeat the purpose of the feature where we are fighting for every split of ms.
You can control the dynamic simulation from script. Try using a trigger, when the support unit enters the trigger remove the groups from the dynamic simulation system (object/group enableDynamicSimulation bool) and they will start to fight each other. Or in such case you might find you don't need to use dynamic simulation at all. Disable those units (enableSimulationGlobal) and when player or your support group enters the trigger, re-enabled the simulation.
There is none. Zeus has the POWER to delete entities if needed. :)
Good point. Noted.
Cannot be done due to backward compatibility and the restrictive nature of the feature. All needs to behave and work by default as before.
You can select multiple objects/groups in EDEN and apply the settings. The setting state is visualized on scene by the blue square next to the object icon to allow fast recognition of dynamically simulated objects from simulated or disabled objects.
As stated above, Dynamic Simulation controls the simulation of objects and units in similar way as enableSimulationGlobal does. Difference is that there is almost no overhead when processing those entities, you have the settings and commands to control it and you have the interface (EDEN) to set it up.
But at the end you will face the fact, that 500 units is quite a lot and even if disabled, they cost some resources. We were testing it in mission with ~800 units and found out, that Dynamic Simulation will not save the day just by itself, as the engine even if they are disabled needs to process them sometimes, check if they still should stay disabled, are valid, their position didn't change etc. and due to the large number it just eats few milliseconds.
I suggest using some high-level approach that will spawn and despawn entities according to player position or mission stage, while handling the entity simulation through Dynamic Simulation. This way you can create a mission that will play well even if you use whole island and hundreds of units.
It depends on the simulation type the particular object uses. E.g. objects using simulation 'house' usually do not benefit from disabled or simple simulation at all while for physx objects there is a major performance increase when disabled and even bigger when simple.
If you would sort objects how performance hungry they are from the most (on right) to the least (on left):
simulated > disabled > simple with class > simple without class > deleted