Re: [DM-dev] finally!! how does this sound?
Brought to you by:
acdalton,
henningsen
From: Stephan B. <ste...@ei...> - 2001-06-11 13:45:57
|
On Monday 11 June 2001 15:42, Henningsen wrote: > Some of the problems i see with doors that are not part of walls: > When a room is made, (let's say rectangular), the 4 corners are > members of 2 walls each, which overlap at that point. What if a user > places a door so that it includes that corner? Does the Wall come > later and erase part of the door? Excellent observation. Yes, But if a user puts a door (a 1x1 door,=20 anyway) he couldn't use it, in any case. But a 1x1 door won't work for=20 the crawlers, in any case. > Another problem with a door that comes to the corner, even if it > always has priority and does not get erased, is that it may > effectively become too narrow, like this > > XXXD > D > X > X > > The door has the minCorrWidth 2, but the opening only has a width of > 1, and actors of radius 1.2 cannot pass. How about enforcing this: If a door is placed on a wall and cannot fit at least 2 open=20 (non-corner) spaces, we simply don't allow the door to be placed, and=20 add() returns NULL (thus alerting the coder that there's been a=20 problem). > Frankly, i don't want to deal with all these special cases just to > give the user the option to place a door anywhere in the dungeon. You I agree 100%. > can have the safety of a hierarchical model (no special case > checking) and the ease of reading a flat file model by leaving out > Door altogether from the object hierarchy, and having > > Wall (normal, no opening), and > WallWithDoor (this is a Wall with a door in it, but with at least > one Wall tile to the left and right of the Door). > > See? All problems vanish! Indeed, it does appear to be that simple! Lemme give it a whirl. Should=20 the doors center themselves on the wall by default? This means no=20 WallWithDoor less than... 4 squares, right? WWWWWWW D D WWWWWWW :) Unrelated:=20 I was thinking last night about a slight alteration in the dungeons,=20 and don't know the crawler-side ramifications of it. How does this=20 sound: Instead of starting with an open space, we start with a filled-in=20 space. Instead of walls we have tunnels. We basically "negate" the=20 dungeon, except that the wall crawlers would have to be changed to do=20 something tunnel-like and not wall-like.=20 Of course, I'm not talking about converting the whole lib to do this,=20 but I thought perhaps it may as simple as "inverting" the square types=20 (open =3D=3D closed, etc.) and adding a TunnelCrawler class. I think it=20 would be a matter of adding classes, but no changes in API at all. What's your opinion?=20 ----- Stephan Generic Universal Computer Guy st...@ei... - http://www.einsurance.de Office: +49 (89) 552 92 862 Handy: +49 (179) 211 97 67 "...control is a degree of inhibition, and a system which is perfectly inhibited is completely frozen." -- Alan W. Watts |