Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Coordinate-based codebases and muds? (http://www.topmudsites.com/forums/showthread.php?t=258)

Burr 05-15-2003 09:05 PM

Right now, I know very little about the coding of muds, so I was hoping to avoid coordinate-based muds, which I infer are probably harder to code and build in than your typical room-based mud.  Unfortunately, the set of ideas I'm having the most fun bouncing around can't be implemented reasonably without using coordinates of some kind.

Here are three specific questions about the types of coordinate systems are out there that I could look at and learn from:

1) Which codebases (if any) have "roomless" coordinate systems?

2) Are there any codebases or derivative muds in which there are rooms, but where each of them corresponds to a single point in a coordinate system? (That is, the rooms only seem to have size if you are in them; otherwise they are points in space.)

3) Are there any codebases or derivative muds out there that have multiple levels of coordinate systems (e.g., one coordinate system across the world and another within each individual room)?

Finally, of the various codebases you may have listed when answering those three questions, which do you think would be the easiest overall to use immediately and learn over time, for someone who is inexperienced at both coding and building?

KaVir 05-16-2003 03:58 AM

The only public codebase I know of which has any sort of coordinate system is Telford Tendys entry in the 16k MUD competition, which you can download from here:

Coordinate systems are not particularly difficult to code or build within - the only real difficulty lies in integrating them into an existing mud. That's why almost of the coordinate-based muds you'll see are written from scratch.

Of course there are also the room/coordinate hybrids, perhaps the most common of which are those utilising a wilderness system, with each coordinate location having a room. Those are fairly simply to add, and wilderness systems are even available in snippet form.

Then there's the "coordinate locations within a room" thing, which is the easiest to implement, but unfortunately doesn't really add much. It does provide an indication of distance within rooms, however, which can allow you to add primative ranged combat, as well as give a vague impression of varied distances within rooms.

OnyxFlame 05-16-2003 11:36 AM

I'm pretty sure Accursed Lands uses a coordinate system, but since I've never played it I have no idea how it's coded or how it affects gameplay. I believe it uses highly customized lpc though.

Amnon 05-16-2003 02:28 PM

Ok, there are two types of coordinate systems you can have (That I can think of at the moment, don't kill me if I'm wrong here :P):

1) Mixed Rooms and Coordinates - Players can enter and exit coordinate mode. That's the easiest one to code, because pretty much all codebases already come with the room system. What I did was designate one room to be the Wilderness Map room, and whenever players are in that room, everything becomes coordinate-based. So you'd add a couple variables to char_data (x and y), change your basic functions - all your get_char's, modify objects (functions that get an object from a location) and mobs to fit it too. Also, you'd need to change certain skills to fit the wilderness, and maybe disable room-effects while in it. It looks like a lot of work, but it can take just a couple of days to code. The map itself should be stored in a data file, and the simplest form should just be a map_table as a double array. You could also add rooms an Exit pointer, so when a player enters that room, he/she is immediately transported into the wilderness room and that location. The reverse of it would be on the map, having a number that's, lets say, larger than 15, will lead the player to that room's vnum.

2) The Pure coordinates system - Just like the first one, but without regular rooms. What you have to do here is clean your code of everything that has anything to do with rooms, redo all your get functions to match for coordinates instead of rooms, and everything else you had to do in the first system.

Like I said, it really looks scary to do, but it's not after you actually start it. Give it a try, but make sure to backup what you already have :P

Hope this helps


All times are GMT -4. The time now is 04:01 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022