In my current project, surviving the environment is going to be a major, and difficult to achieve goal for players. One necessary element to survival will be the construction of shelters - something I'd like to do dynamically. As such, flagging a turf as indoors or outdoors will be necessary.
I'd like to be able to determine if, for every 'indoor' turf, there is shelter from wind (based on walls) and shelter from precipitation (based on roofs). A roof wouldn't be difficult to track; is either there, or it isn't. Walls, on the other hand, provide a certain challenge - how do you know if they actually enclose an area?
At one point I was actually thinking of walls to check to see if circuits are completed, and a similar methodology might work here. If something can follow the 'road' back to the starting point, then there's a complete circuit... and everything iside is marked as 'indoors'.
Actually, a glance at ancient history shows that I'm not the only person who has thought about making a circuit type system; Clicky .
The reason for posting, though, is to see if anyone has anyt thoughts on this topic. How would you go about declaring if something is indoors, or outdoors dynamically?
ID:152625
Apr 16 2006, 5:56 am
|
|
That seems feasible. The big challenge would be responding to updates in status, making changes dynamically.
Well tracing a circuit is actually the easiest part. Start with any wall or door turf, and follow it around in one direction. If a turning presents itself, choose the outer. This will give you the entire building's outline.
However for dynamic systems, you're probably better off using individual rooms and using areas to trace them. Here would be my approach:
There are probably simpler ways to do this.
Lummox JR