|
|||||||
This is a discussion on "Implementing Virtual rooms/areas" in the Top Mud Sites MUD Coding forum : I know there is code out there to create virtual areas. that is you define the size and shape and seupply all the descriptions and such, but the code virtually creates the rooms so that they dont all have to be created seperately. Does anyone know where i could find the code for this? Its for an amylaar LP mud btw... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
New Member
Join Date: Jun 2002
Posts: 12
![]() |
I know there is code out there to create virtual areas. that is you define the size and shape and seupply all the descriptions and such, but the code virtually creates the rooms so that they dont all have to be created seperately.
Does anyone know where i could find the code for this? Its for an amylaar LP mud btw |
|
|
|
|
|
#2 |
|
New Member
|
Snowfruit,
Why on Earth would you want to create a "virtual area?" It is possible to do in LP and I have some examples I could send you - but I've never had anything but problems from them. In the end it is easier to code up the rooms and just drop them into your directory. Good luck and if you still want the code send me an IM where I can send some samples to you. -C... |
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 5
![]() |
This won't answer you question, but I felt an urge to reply anyway.
Your question makes me shiver almost as much as when I read some mud ad recently where they claimed to have 1,000,000 rooms. When you code a quality area the time it will take to create the actual files is marginal compared to them it takes to write it's content. Virtual rooms end up (in my experience) either as mazes or as hack 'n slash forests where every room is identical to the last. "Well says the coder: It is a forest, what else do I need besides trees?" Neither of those 2 results appeal to me as a coder and they are a huge turnoff for almost all players. Any 20 room area that was coded with care and detail will beat a 1000 room virtual area. Perhaps I'm wrong in my assumption where you want to use it for. If so provide some details as to what you are trying to accomplish with it and I'm sure I can give you some ideas how to realise it (with or more likely without) the use of virtual rooms. Greetings, Eddy |
|
|
|
|
|
#4 |
|
New Member
Join Date: Jun 2002
Posts: 12
![]() |
Heh
Personally I have creates a rather complex maze with directional exits in which there are also slight diffferences in the descriptions, although no mayor ones because it is a maze after all. this is about 500 rooms. In progress i have an ocean, now you can say what you like but creatin a 1000 room+ ocean to act as a logical transistion between various island areas is no fun if you have to create each room individualy. With the possiblity of having an number of unique descriptions and then assigning these randomly between all the rooms in the area it is a lot easier, And of course in the places within that area that i want something special, hard coded rooms will be added (which believ me will number several 100 at least, so no one can say I dont spend time at my areas Now I must admit that the possibiliyt of lazy coders abusing a system like this are of course massive. But it all depend on the mentality od the coder, if they are going to abuse a system like this to create hundreds of repetitive rooms, they are going to do the same even without vr. I like this idea, even so I only use it rarely. I prefer smaller areas, with diverse content. But some areas are just that much easir to make this way, and may even be better for it. Thats just my reasoning however. Besides I like the challenge of actually trying to code a system like this that actually works -- Snowfruit snowfruit@eircom.net |
|
|
|
|
|
#5 | ||||
|
New Member
Join Date: May 2002
Posts: 5
![]() |
Without having seen it or knowing about the context of the game you code for it's impossible to cast a 'good' or 'bad' judgement on your work. It does however still leaves me with the same questions and worries.
Quote:
Quote:
Quote:
Quote:
Regards, Eddy |
||||
|
|
|
|
|
#6 |
|
Member
Join Date: Apr 2002
Posts: 122
![]() |
Virtual area generators like the one being described are good for generating large tracks of uninteresting wilderness for RPI MUDs. While the ship hack described by Eddy will give the minimal illusion of travel needed for SoD on an average MUD, RPI MUDs need to think of the next step... What happens if someone throws you overboard? How far can you/your eq sink? At this point having a virtual room daemon starts to look mighty appealing.
|
|
|
|
|
|
#7 | |
|
Member
|
Quote:
Kas. |
|
|
|
|
|
|
#8 |
|
New Member
Join Date: Jun 2002
Posts: 12
![]() |
Phew I had no idea my simple question coudl generate som uch respons
Anyway, I think I totally agree with Thelenium. In a role playing environment just getting told you are on a ship and it has instantaneously transported you to that island many leagues away just doesn't do it for me. Its the having to find a row/sail boat or whatever that can take me out there and trying not to fall overboard, or at least no outside of swimming distance of land. And if you do, how am i going to get my eq back form the bottom of the ocean floor. Thats the kind of thing i was aiming for rather than just a 1000 fille rooms. People don't enjoy going through room after identical room, however I have always hated muds where one 7-mile step takes you from a freezing tundra into a tropical island. The bits in between are necesarry in my opinion. So I like to create them, and preferably spend my time making them interesting with the extra bits of code instead of spending hours saving all those repetetive room files - believe me I have tried it that way, and after a while the temptation to just leave them all the same is very large. I personally, find that if i don't have to worry about the actual creation of the files and leave it to the vr system, the overall quality of a large area like for example an ocean improves by leaps and bounds. So to get back to the original question, does anyone have any ideas of how to go about this? I have actually managed to get together a fair bit of code already, but any outside input would be most appreciated. --Snowfruit |
|
|
|
|
|
#9 | ||
|
New Member
Join Date: May 2002
Posts: 5
![]() |
Quote:
Quote:
This is an approach from the top of my mind how to handle it. File A: Central ocean handler - Contains all data on descriptions and whatever else is needed. File B: Ocean room - Local vars for the current virtual x and y location File C Underwater room - Same as ocean room but used when you fall overboard File D storage room - Safekeeping place for items that were left in 'another' virtual location Now the handling part when a player enters the ocean -> Clone a new instance of the ocean room -> Move player into the clone -> Get descriptions from central handler (based on x,y) -> Get exits for central handler (based on x,y) exits actually only change x,y, refresh the descriptions and move any items to and from the storage room. If you want players to be able to run into eachother you will have to keep track of x,y locations in the central handler and add moving logic in there. The number of actual objects loaded in this scenario will be 1 central handler object 1 storage room object (add a mapping of x,y locations and the items that belong there) 1 object per player (either an ocean or or underwater room) Hopes this helps and awaiting your responses Eddy |
||
|
|
|
|
|
#10 |
|
New Member
|
On the MUD - I work on, we've gone to great lengths to try and remove many of the virtual areas in play. One they looked bad and two - they broke and players got stuck.
One of the situations we came up with was the ability to have a ship that moved in "real time" (or something less then instant.) The ship is 8 rooms large - aft rooms, port rooms, starboard.... plus we have a room for water, where the player could "jump" off. If the player jumped off, it is possible for the ship to leave them, and the player is stranded in the water until another ship came by. The ship is controled by slaves rowing, if you kill the slaves - the ship stops to row. Here are my examples of making this work. In this first file - is the ship speed controller. [code] /* Coded by Zor 05/98 */ #include <shadow.h> #define SLAVEROOM SHIP"slaveroom" int query_speed(); int change_speed(); int howfast; int change_speed(){ object *inv; int count; int slavecount; object slave_room; slave_room = find_object_or_load(SLAVEROOM); if(!objectp(slave_room)) { howfast = 13; return howfast; } inv = all_inventory(slave_room); slavecount = 0; count = 0; while(count<sizeof(inv)) { if((int)inv[count]->query_is_slave() == 1) slavecount+=1; count++; } howfast=slavecount; howfast += 15; if(howfast == 0) howfast = 6; if(howfast > 24) howfast = 40; return howfast; } int query_speed() { return howfast; } [/quote] Here is the actual ship controller: [code] /* Coded by Zor 12/98 */ #include <shadow.h> #include "speed_m.h" #define WATER SHIP"water" #define S_AFT SHIP"star_aft" #define P_AFT SHIP"port_aft" #define S_FORE SHIP"star_fore" #define P_FORE SHIP"port_fore" #define S_DECK SHIP"star_deck" #define P_DECK SHIP"port_deck" #define CABIN SHIP"cabin" #define SLAVEROOM SHIP"slaveroom" #define ATHENS1 SPATH"pier" #define CRETE1 CRETE"pier" #define FOOTPAD1 FOOTPAD"pier" #define DANIEROS1 DANIEROS"Danae_pier1" #define ATHENSCITY ATHENS"port3" #define AT_DOCK 30 #define DISTANCE 40 inherit TREASURE; void arrive(); void tell_ship(string); string *ports, *port_paths; int count, num_ports, from, distance_gone,speed; void create() { ports = ({ "South Port", "Crete", "Footpad Isle", "Danieros", "Athens City" }); port_paths = ({ ATHENS1, CRETE1, FOOTPAD1, DANIEROS1, ATHENSCITY, }); ;;create(); set_id("ship"); set_alias("galley"); set_alt_name("slave_galley"); set_short("Slave Galley"); set_long( @DESC The vessel before you is a large slave galley which has been known to ferry adventurers from island to island. Be warned however, although the captain does not ask for payment, money often goes missing from this ship's passengers. DESC ); count = 0; num_ports = sizeof(ports); from = count - 1; if(from < 0) from = num_ports - 1; this_object()->move_me(WATER); call_out("water", 20, 0); } int get(){ return 0; } void init() { ;;init(); add_action("board", "enter"); add_action("board", "board"); } int board(string str) { if(str != "ship" && str != "vessel" && str != "slave galley") return 0; if( random(10) > 3) { write("Someone on the boarding plank brushes up against you\n"); this_player()->add_money(-(random(70))); } write("You board the Slave Galley!\n"); tell_room(environment(TO),sprintf("%s boards the slave galley.\n", NAME),this_player()); tell_room(P_DECK,sprintf("%s boards the slave galley.\n",NAME)); this_player()->move_me(P_DECK); this_player()->command("look brief"); return 1; } void water(int distance_gone) { if(distance_gone < DISTANCE){ speed=change_speed(); distance_gone+=speed; if(speed>12) tell_ship(sprintf("The slaves are whipped and beaten as they row to %s.\n",ports[count])); if(speed<13 && speed>2)tell_ship(sprintf("With effort the slaves row to %s.\n",ports[count])); if(speed==2)tell_ship(sprintf("The currents carry the ship towards %s.\n",ports[count])); remove_call_out("water"); call_out("water", 20, distance_gone); } else { remove_call_out("water"); distance_gone=0; arrive(); } } void arrive() { tell_room(port_paths[count],sprintf( "A Slave Galley arrives from %s.\n", ports[from])); tell_room(WATER, "The slaves forced efforts carry the galley over the horizon.\n"); tell_ship(sprintf("The slave galley arrives at %s.\n",ports[count])); TO->move_me(port_paths[count]); count++; if(count > num_ports - 1) count = 0; from = count - 1; if(from < 0) from = num_ports - 1; call_out("sail", AT_DOCK); } void sail() { remove_call_out("sail"); tell_room(environment(TO), sprintf( "A whip cracks and the slaves begin rowing for %s.\n",ports[count])); tell_room(WATER,sprintf( "A slave galley pulls in from %s.\n",ports[count])); tell_ship(sprintf("The slave galley continues on to %s.\n",ports[count])); this_object()->move_me(WATER); call_out("water", 20,0); } void tell_ship(string mesg) { tell_room(S_FORE, mesg); tell_room(P_FORE, mesg); tell_room(S_DECK, mesg); tell_room(P_DECK, mesg); tell_room(S_AFT, mesg); tell_room(P_AFT, mesg); tell_room(CABIN, mesg); tell_room(SLAVEROOM, mesg); } int clean_up(){ return 1; } string query_location() { return ports[count]; [/quote] Good luck - and this is just one of the examples we have. Many of the other ones have been a bit tweaked. Let me know if we can help out with anything else. -C... P.S. I need to thank the Admin and Zor of GateWay MUD for letting me show this code. |
|
|
|
![]() |
| Thread Tools | |
Implementing Virtual rooms/areas - Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Jail time for virtual violence? | KaVir | Legal Issues | 15 | 12-20-2006 04:13 PM |
| Virtual Worlds - The Rules of Engagement | the_logos | Tavern of the Blue Hand | 3 | 05-04-2006 12:36 PM |
| Virtual blood | SolViLune | Tavern of the Blue Hand | 0 | 10-11-2003 05:53 AM |
| 230+ zones, 25.000+ rooms, millions of wilderness | Hephos | Advertising for Players | 5 | 05-05-2003 06:03 PM |
| Season-Changing Rooms? | Faye | Advanced MUD Concepts | 12 | 09-26-2002 01:57 PM |
|
|