Jump to content
Sign in to follow this  
droo_k6

createVehicleLocal and hideObject performance

Recommended Posts

I am trying to figure out if it would be worth it to create a script that will have the server check where the player is and then send him a list of objects to create (locally) or delete, hopefully to improve performance.

Problem with this is managing the objects moving between clients and stored variables to be shared so now I am wondering if hideObject would have a decent performance gain compared to.

Share this post


Link to post
Share on other sites

I would assume, that if someone made a good object cache or hide objects script, it would have very noticeable performance increases on maps filled with alot of objects. Ofcourse it's redundant otherwise.

Share this post


Link to post
Share on other sites

Bumping

Anyone know of any mission that does something similar to this? For example I know insurgency has the clients manage the marker colors locally.

Share this post


Link to post
Share on other sites

Yeah all setMarkerX commands have a local variant.

Share this post


Link to post
Share on other sites
Yeah all setMarkerX commands have a local variant.

...that's not my question

Share this post


Link to post
Share on other sites
...that's not my question

But at the same time he answered it. Because you're wanting to craft client side performance, yet he's pointing out it's easy to manage markers locally because setMarkerX commands all have local variants, that's why you see such local effects in insurgency.

Also, your script idea doesn't need to be run on the server, only on the client. And you can use deleteVehicleLocal to locally delete vehicles. However, you will have to cache the vehicles, location, weapons, etc so when the player is back near the cached object it "unhides" it. But, if they are edited while the vehicle is deleted there will be some sync issues. Trying to optimize server performance is a pain, sadly.

Share this post


Link to post
Share on other sites

But at the same time he answered it. Because you're wanting to craft client side performance, yet he's pointing out it's easy to manage markers locally because setMarkerX commands all have local variants, that's why you see such local effects in insurgency.

Also, your script idea doesn't need to be run on the server, only on the client. And you can use deleteVehicleLocal to locally delete vehicles. However, you will have to cache the vehicles, location, weapons, etc so when the player is back near the cached object it "unhides" it. But, if they are edited while the vehicle is deleted there will be some sync issues. Trying to optimize server performance is a pain, sadly.

I know about the local variants of the marker commands already, I was stating an example of a mission that I know does something similar.

Does hideObject bring any similar effects compared to deleting locally/recreating locally?

Thanks for the answer though.

Share this post


Link to post
Share on other sites

Yes I would guess if a player didn't have to keep an object rendered it would be beneficial to the players. Here's a far fetched idea; Look into DAC, it can create random objects I think and cache them. I'm not 100% as I have never used DAC to make any objects, but only actual units/infantry/vehicles etc. Which it does cache infantry and even vehicles I believe. Been too long though since I used DAC.

Share this post


Link to post
Share on other sites

Define performance. Are players running on low fps or is the server? Hiding objects on clients will most likely not help increase server performance. Tho I would like to see your mission if you have so many objects that it actually causes a FPS drop, if that's case you might want to either set down the view distance (can be done in init) or decrease the amount of objects. One other thing you might want to try is to have enableSimulation false on objects that are just clutter, that causes them to not send any updates across the network among some other things (no damage, no animations, you can't get in them if it's a car etc). I cannot tell how enableSimulation and hideObject affects the AI server-side however. I also don't think theres a deleteVehicleLocal command, only a createVehicleLocal one.

Share this post


Link to post
Share on other sites
Yes I would guess if a player didn't have to keep an object rendered it would be beneficial to the players. Here's a far fetched idea; Look into DAC, it can create random objects I think and cache them. I'm not 100% as I have never used DAC to make any objects, but only actual units/infantry/vehicles etc. Which it does cache infantry and even vehicles I believe. Been too long though since I used DAC.

I will look into this, thanks.

Define performance. Are players running on low fps or is the server? Hiding objects on clients will most likely not help increase server performance. Tho I would like to see your mission if you have so many objects that it actually causes a FPS drop, if that's case you might want to either set down the view distance (can be done in init) or decrease the amount of objects. One other thing you might want to try is to have enableSimulation false on objects that are just clutter, that causes them to not send any updates across the network among some other things (no damage, no animations, you can't get in them if it's a car etc). I cannot tell how enableSimulation and hideObject affects the AI server-side however. I also don't think theres a deleteVehicleLocal command, only a createVehicleLocal one.

It's a TLR mission (link) and yes almost all users will have to turn down view distance/ terrain details and eventually the server has to be restarted just to increase client fps (almost no script lag though thankfully).

We run the scripts from R3F for moving objects (so forts/hideouts/checkpoints spread out), tons of vehicles and all the objects created for the mission items, then the custom buildings placed. I think its the vehicles generally though. It may also have to do with this ticket (link).

The enableSimulation page says the opposite though, or I am reading it wrong (link).

And yes there is no deletevehicleLocal command, atleast not on the scripting commands page (link).

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
Sign in to follow this  

×