Just wondering, anyone as insane as I?

From: Hades (tourach@cyber1.servtech.com)
Date: 04/10/96


Oh man, I was just wondering if anyone out there is as mentally WACKED as I
am.

I just spent countless hours (oh 8 or so) completely converting the world
structures of my mud. The world is no longer referred to by:
world[rnum].data

Actually, there are no more room rnums. All exits are accessed by pointers.
room 3025 does not have a numerical value for to_room, to_room is a pointer
to that room. ch->in_room is a pointer to his room, rather than the rnum of
his room.

The world is now one huge linked list. And my GOD is life 1,000,000x easier
now. That old, clunky way of olcing (completly copyng the world to a new,
larger world structure, then freeing the original, then copying back) is no
more. I just call create_room(vnum) and whammo, it adds a room to the linked
list. You want a virtual room for a while? Leave vnum = 0 and it will create
some virtual vnums for temporary rooms. My mud now builds itself. I have
dwarven miners actually digging out new mine tunnels, with an occasional
cavein. The new mine rooms don't save over reboots, because that would just
be silly, but damn it's cool watching em mine away.

Completly modular rooms that can be created and destroyed on the fly.

And while I was at it, I junked that crappy dir_option[5] thing. Too
restrictive. I want 2 doors in the north wall, dammit! Well now I can put 32
exits per room (actually more, but I use a bitvector to see if an exit
number exists, to save cpu time searching the list of exits), and more if I
lose the bitvector idea. Exits are now a linked list. n s e w u d all work
normal, and the other special exits now work with keywords. enter <keyword>
and you walk to the connected room. I can now have a room with exits, n, s,
e, w, down, a trapdoor leading to another room down, a second door in the
east wall, and a cabinet against the west wall. It's pretty damn nice.

Well I just wanted to inform the list of my insanity (unless you are very
serious about trying this yourself, I suggest you don't. It took me 8 hours
of straight coding to remake the structures, convert every damn occurance of
world[] and real_room(), figure out how to get around the problem of how to
assign exits upon boot-up (you can't define a pointer in the text .wld file)
and come up with some new exit and room-handling utilities.

Has anoyone else even attempted something like this? I think it was WELL
worth it, it openes up TONS of new avenues which I may code down.

If you have the time and paitence to do it, I suggest you do. And Jeremy,
you might wanna try something like this for future versions of CircleMUD, it
makes coding a lot easier. ch->in_room->contents is nicer than
world[ch->in_room].contents.

Hades the insane.
Come by and see our mining dwarves at 204.181.11.243 8888
				      ebonmists.roc.servtech.com 8888



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