View Single Post
Old 05-16-2003, 02:28 PM   #4
Amnon
Member
 
Join Date: May 2002
Posts: 140
Amnon is on a distinguished road
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
Amnon is offline   Reply With Quote