Jump to content

Recommended Posts

(On Dedicated Server Setup)




I'm working on a script that spawns in specific AI units in specific locations upon activation of a trigger. This is for performance purposes but also because I want to be able to disable the AI in certain situations. In order to set the unit in exactly the position I want them to be in, I'd like to use the Eden editor.


Next I have a few options on how I can spawn them in. I'm not sure how each will tax the server resources and I'd like to use the option that is the most efficient to avoid latency and hardware slog.


1) I've thought about creating each unit individually via script and pass xyz coordinates for placement. I imagine this will be slow, taxing, and may not even be possible from what I've read about the z variable in position.


2) I can place an object like a "can" where I want them to spawn, turn the can invisible and then replace the cans with my units when the trigger is tripped.


3) I can place my units in a group name, set the units for simulation false and hidden in the init and run a script that activates and shows them upon trigger.


I'm leaning towards option 3, but what is the resource cost of having a hidden deactivated AI preloaded in place? Should I expect it to be similar to having them entirely loaded and activated? Should I instead use one of the first options?


I'm open to other suggestions as well, but would like to get a feel for how taxing a hidden object and a shown object are on the server. I'd also like to know where I can learn more about activating objects visibility, collision, ect so I'd you have a link of be very grateful.

Share this post

Link to post
Share on other sites

There is a performance boost when hiding and disabling simulation of units.


Also, for reasons unknown to me, lots of groups is bad. Even if they're just full of objNull, so keep the number of groups as low as possible -- I did a test with 166 groups and almost all of them were for groups where the units were deleted (Forgot to add group deletion in my garbage collection) and FPS would stutter because of it. The issue went away once I fixed this. IMO it is best to utilize exactly what you need and not get greedy, which is part of the art of design and optimization lol.


Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now