Jump to content
Sign in to follow this  
Smart Games

performance difference between deleteVehicle and hideObject

Recommended Posts

Lets say I spawn 200 groups with 600 units. 

I want the units out of range of the player  to be hidden so that I get more performance. 

 

In my opinion, this is much easier to implement with hideObject than if I delete each unit, save all the data and then create it again later.

Only it would be important for me to know how big the performance difference between hideObject and deleteVehicle in such a large scale scenario is.

Share this post


Link to post
Share on other sites

personally I dont create anything at first but only when player comes near enough to the desired location then I create the enemy groups. if you use hideobject the game engine will probably do some stuff with the units even they are hidden and that can cause some lag. you would need to also disable their AI

  • Like 2

Share this post


Link to post
Share on other sites

@gc8, I optimized my code and made them only spawn when I am near + hide them, if the players are far away.

 

I pretty much doubled my fps. ^^

  • Like 2

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  

×