Product Chat / How do i unload parts of the map from memory after i pass them?

Author
Message
jvwjgames
9
Years of Service
User Offline
Joined: 2nd Mar 2015
Location:
Posted: 5th Mar 2015 05:08
Basicly what i am saying is i currently have some enemies farther in the game that don't spawn at start to avoid my game from slowing down so when i pass a certain area it will load the rest of the enemies in VIA Trigger Zones. Is there something i can do to unload the part of the map i was just at or can i do it via LUA script?
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Mar 2015 11:56
Well, you can hide things, but from experience that does little to speed things up. Once an enemy object is spawned that's it really, hiding does little to help from there on. We need occlusion for this to be handled properly. You only really gain speed at the start by not spawning characters or objects.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 7th Mar 2015 23:33 Edited at: 7th Mar 2015 23:42
You could use this script in a trigger zone to destroy the previous entity's . just change the entity numbers to those you want to remove.

-


I am not sure if this still works with static entity's after recent changes but I have used this right up to v1.085 and it worked fine....try it and see.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 9th Mar 2015 12:10
That's okay as long as you don't want to go back of course


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 9th Mar 2015 18:02 Edited at: 9th Mar 2015 18:11
Yep, I guess that is true, I used this myself to create the illusion of level jumping as I wanted very different areas for the player to traverse and this was the only option at that time. The player wasn't going back again so spawned a rockfall or whatever to block passages after destroying the assets no longer required. Maybe destroyed and respawned could be a workaround if that is what you want, of course media would continue to be held in memory but should help with FPS at least. Once we have level load and unload or proper culling as you say, all this will work better and no need for funky workarounds
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 10th Mar 2015 00:33
Still, for certain game types a nifty bit of code


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.

Login to post a reply

Server time is: 2024-11-23 03:33:53
Your offset time is: 2024-11-23 03:33:53