ID:154404
 
I've been trying to setup a text mud base system that works pretty simply, where you can move any direction on the map, which is invisible to players, assuming you're able to move in that direction. If you can't, it returns a "You can't go that way" right away. If you can, it return "moving [direction]", sleeps for the speed of the turf you are in, moves you in the direction you want, and gives you the description for that room.

Has anyone thought up a smooth way to do this? I've been trying and every time I do, I find new little problems I didn't expect to find before...
Has anyone thought up a smooth way to do this? I've been trying and every time I do, I find new little problems I didn't expect to find before...

I skimp on the map, usually, and make a room-based MUD, but this is a digression from your original topic.

As a plus, though, I can make infinite hallways at a whim! =)
Foomer wrote:
I've been trying to setup a text mud base system that works pretty simply, where you can move any direction on the map, which is invisible to players, assuming you're able to move in that direction. If you can't, it returns a "You can't go that way" right away. If you can, it return "moving [direction]", sleeps for the speed of the turf you are in, moves you in the direction you want, and gives you the description for that room.

Has anyone thought up a smooth way to do this? I've been trying and every time I do, I find new little problems I didn't expect to find before...

I can tell you how I do it. Each room is an area, each has a unique tag, and each has a variable named after a direction. If I want the Lounge room's east variable to go to the Pool, I set Lounge.east = "Pool".

Then you just alter the client commands .east and such to make it say "You can't move there" if usr.loc:east is null, and move them to locate(usr.loc:east) if it's not null.

Z
In response to Zilal
Then you just alter the client commands .east and such to make it say "You can't move there" if usr.loc:east is null, and move them to locate(usr.loc:east) if it's not null.

Whoa, that's easier than my method. My method involves assigning ID numbers to rooms, which are then referenced by number.
In response to Spuzzum
There's also a fairly decent lib on the hub to create text based games done by Dan =)

MUD Lib
In response to sapphiremagus
sapphiremagus wrote:
There's also a fairly decent lib on the hub to create text based games done by Dan =)

MUD Lib

Mine does the same thing, under my own custom system, so I'd have no need for that.

(I understand if you were opening that up generally, but you replied to my post... and, as we all well know, my posts are ruled with an iron fist and a copper-plated pair of spectacles. =) )
In response to Spuzzum
On top of that, I can't stand having room descriptions in a sepperate window...might just be me, but...well, yeah.
In response to Foomer
Foomer wrote:
On top of that, I can't stand having room descriptions in a sepperate window...might just be me, but...well, yeah.

Actually, although I generally like cramming things together, that sounds like it could be a pretty decent idea if done right. My main problem with room descriptions in old-fashioned telnet MUDs is that they get in the way of the action messages and the action messages get in the way of the room descriptions.
In response to Leftley
That just means your screen resolution isn't high enough :o)
Foomer wrote:
I've been trying to setup a text mud base system that works pretty simply, where you can move any direction on the map, which is invisible to players, assuming you're able to move in that direction. If you can't, it returns a "You can't go that way" right away. If you can, it return "moving [direction]", sleeps for the speed of the turf you are in, moves you in the direction you want, and gives you the description for that room.

Has anyone thought up a smooth way to do this? I've been trying and every time I do, I find new little problems I didn't expect to find before...

I am actually almost ready to release a BYOND MUDLIB. It handles all this for you and has OLC built into it. You can give certain people builder status and assign them zones to work on. It's actually comming along very well. I can't wait to Zilal releases her parser lib because that will make the mudlib really kewl.
In response to Zilal
I'd love to see a simple demo of that sometime...
In response to Zilal
Heh, 5 months later, I finally get around to looking up the 'tag' variable... Now this makes sense.