#define C_CLEAR_SCR "\e#define C_CLEAR_SCR "\e[2J" // Clear Screen[/code]
// blah idea
bool is_same_spot (CHAR_DATA *ch, CHAR_DATA *gch)
{
if (ch->in_room != gch->in_room)
return FALSE;
if (ch->in_room->location[x] != gch->in_room->location[x]
&& ch->in_room->location[y] != gch->in_room->location[y])
return FALSE;
else
return TRUE;
}
room = wilderness_lookup(x, y);
room->name; // is valid
room->x; // is valid
room->people; // is valid
// It's a real ROOM_DATA so all regular fields become valid after this call.
wilderness_print(player, x, y); // I would not build rooms to generate a map.
I think I've only used a handful of snips over the years, but that's one that I wouldn't mind not having to reinvent heh. Although I'm sure I'd hack the heck out of any I found making it into the version I want. I'm sure I'll have to knuckle down and just write my own heh ;D
I think they're pretty easy really. There's more than one way to do it but arrays with x/y coordinate is by far the most popular. I'm working on a codebase in Ruby with Chris Bailey that's coming along nicely and I think it'll include that tool by default.
(pulled off another thread, figured it was worthy of it's own tangent).
My thoughts on Wilderness in a RoM/RaM setting (just off the hip, wanted to start a discussion of approaches etc):
1. An 'overhead' map approach vs a generated description only type approach.
a. I think most prefer the 'heads up map' as that's what I've seen more of.
b. Clear screen type 'refresh' vs scrolling with said overhead map.
b1. Most seem to scroll, personally I like clearing input.
b2. Scrolling does allow for 'look back' though.
c. Generated descriptions _only_ could actually be nice, would keep the feel of the 'wilderness' more like the rest of the game (assuming you don't normally have said overhead map).
c1. Generated descriptions allow more dynamic descriptions based upon time of day, weather, room contents, which entrance you took into the room, etc etc.
2. Single 'room' per wilderness vs…? (assuming X/Y type coordinate area)
a. Allows a nearly endless supply of wilderness areas depending on the size you set in X/Y.
b. Requires some reworking of 'in_room' type checks to see if the 'room' is actually it's own wilderness area.
b1. To avoid fighting etc, when the actors are actually say '30' apart (whatever measurement type the wilderness uses).
b2. And any other type interaction etc, unless they have the 'range' for that.
c. Could allow each room to be a 'wilderness' in the sense that it would have x/y coordinates, essentially turning the game into a coordinate based for each. Interesting thought there… Sized rooms and 'where in the room'…
Anyway, just popping off the top of my head, feel free to chime in (or renumber, or all that heh).