Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Splitting a map into zones w/ dynamic objects

Author
Message
anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 29th Jul 2011 14:26
Right now I'm redoing my CSM map code to allow for zones to be included - if the camera is in a zone, only two types of static objects will be rendered
*objects specific to that zone
*objects not specific to any zone

This works fine. That means I can transition from one room to the next and automatically disable/enable collision detection while passing through each room. I could extend this concept further, but for now it's proof-of-concept.

But what about dynamic objects? Would that be the same as well? If an enemy is not in an active zone, just disable it and 'freeze' it until the player is in the zone again? Reset the enemy if it's midattack or something?

I guess I've never done anything like this before, with shutting down portions of the map during gameplay. I'd like to know what considerations I should make now to prevent headaches later.
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 29th Jul 2011 15:54 Edited at: 29th Jul 2011 15:54
You can use the set zone in combination with the point in zone to check if the dynamic object is in the zone. If it isn't you can exclude it from the render using exclude object on and exclude object off.

edit then only problem with this is that your zones need to be boxes.

Login to post a reply

Server time is: 2026-07-11 03:38:04
Your offset time is: 2026-07-11 03:38:04