[RFC] Adding Room Dimensions (width, length, height)

From: JoeR (joer@email.com)
Date: 06/26/99


Issue: .WLD file format change.

This is a "Request For Comment".

I added width, length, and height fields to the room_data struct.  Also
modified the OLC redit code to deal with it and db.c is changed to parse in
the values... and I will be modifying fight.c to take room dimensions into
account when ranged weapons are being used.  act.informative.c will also be
modified when looking in a certain direction (I've changed the code to
display the actual room as if you were there when looking into the next
room.. so if it's too far to see across the room you're _standing in_, then
that needs to be handled.)

Why have room dimensions?...
At first, for RANGED weapons simply assuming opponents are at opposite ends
of the room and dividing distance by a random factor if player was
sneaking/hiding when attack began (plus a certain amount depending on their
SNEAK skill proficency), an additional parameter is available for
calculating hit probability.  Another use of room dimension would be to
allow for an additional description automatically provided to the user
(probably best just for situations when the dimensions are beyond "normal"
values -- similar to the descriptions generated using a table for damage
descriptions -- (if indoors & height > VERY_HIGH then tell player "the
ceiling is very high above you.").  Another use would be for when vehicles
or mounts are being used... add ROOM_RELATIVEPOS flag for handling movement
"relative" to it's size and treat movement through the room realistically.
For example, if a room was flagged for relative positioning and it was 1000
meters in length and the player wasn't in a vehicle, then the same room
would repeat X times to reach the other side.. but if a player was in a
vehicle they would move straight though the room.  This makes it useful to
have a vehicle AND makes it a little more realistic when "walking" from one
city to another.. if you were riding it would take much less time to get
there (this would also cut down on a bunch of generic rooms that sort of
take into account for great distances but fill up the .wld file with boring,
featureless rooms).

Implementation...
The new values are indicated in the .wld file with W, L, and H labels
(before the D/E/S stuff).
This makes it easier to deal with unmodified .wld files (if the W/L/H
parameters aren't there then NULL is assumed and a default room dimension is
used in that room).

The new .WLD file layout looks something like:

#<virtual number>
<room name>~
<room description>
~
<zone number> <room bitvector> <sector type>
W<room width>
L<room length>
H<room height>
D0
<look north text>
~
<portal keywords>~
<door type> <key number> <leads to room #>
E
<keywords>~
<description of extra item>
~
S

Additional features that could be added later which use the room dimension
values:
o partially auto generated room descriptions based on size
o relative movement through rooms based on if player is walking or riding
o handling ranged weapons better (if the room itself is too far to
accurately shoot across, then how could the player possibly fire into the
_next_ ROOM?)
o object placement within the room based on cartisan X/Y system
o auto generated "map" of the room - showing players position and any
mobiles or objects within the room - and further, allowing for "player
facing direction" (face n, face s, etc) plus all of the possible uses for
that (if you were facing AWAY from an attacker sneaking up from a room
behind you, then your chances of getting hit on the first try would be
greater...)
o moving around the room during combat

I know some of the ideas for additional features would be difficult to
implement, but man, wouldn't it be cool?...

I was hoping to get feedback on this initial modification (adding room
dimension for ranged weapon hit calculation) and possibly any additional
ideas anyone has.

Thanks!


---
Joe Rykowski ('Cyklop'), SysAdmin/Builder/Coder
>> C.O.R.E. MUD - a post-cyberpunk adventure
>> http://members.xoom.com/CoreMUD/


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST