Replacing the OOC portal with an OOC subway system

From Redwall MUCK Wiki

This page was imported from a forum post dated January 18, 2009 in the category World Building and Coding by Otter. Its content is likely to be out of date!

This post had 16 replies.

Sun, 01/18/2009 - 12:59


Aleltai built a subway underneath parts of the MU. He did so without a W flag, so there were limits he had to work around. However, it got me thinking about a full featured subway in MUF with permissions to let players interact with it.

My thought is to build the subway program and replace the 'portals' OOC command with it. Players could add 'OOC platforms' to their IC area, such that a player going 'ooc' from their IC area lands in their ooc platform (that code is in place now to have IC areas map to OOC areas with the 'ooc' command). Then, players would "take the subway" to where they wish to go, which could involve changing trains. The subways move. So if you sit in a car, you will see various stops go by.

Below are the rules (well, ontology, events, some rules, some requirements intermixed) for the system. (NOTE: this is in the NMC tree officially as nmc/specs/Mu Railroad.txt for those with cvs access.)

Any suggestions welcome!

Keep the Light,

Otter

MU train

1. Each train has a room so the people on it are together.

2. Each train is "on a route".

3. Each route has a "sequence of platforms" it visits that is always

  circular.

4. There is a 'time' between platforms on each route specified by

  by the railroad.

5. A station can have many platforms (imagine uptown/downtown circle).

6. All train rooms are owned by Railroad.

7. Each platform has link-in/link-out permission to Railroad.

  Should the permission vanish, the railroad will 'forget' the platform.

8. No route can have LESS than two platforms.

9. No platform can be in any route more than ONCE.

10. Every platform entry carries the following data:

   1. time period (in seconds) after "leaving" this platform
      before the next is arrived at.
   2. #id of the platform
   3. time period (in seconds) to board on this platform
   4. The message given on arrival into the platform (inside the train)
      with substitions defined.
   5. The message given PENDING arrival with substitions to the
      platform.

11. If a train is empty it still 'runs' (by setting timers and updating

   its own properties).

12. If a train is empty the exit is not linked to reach the platform.

13. If a platform is empty, the exit is not linked into the train.

NOTE: Rules 11 through 13 reduce DB hammering. The train will still

     move, arrive/depart messages will still happen, but that's
     all in-memory stuff. It doesn't require forcing things and
     loading the logs.

14. When a train is due to arrive, if there is no train present, it

   arrives. If there is a train present, it sets a 5-10 second delay
   and tries again. Because the MU single-threads and each MPI runs
   to completion, this will ensure two trains don't share a platform
   at the same time. It also ensures that trains won't literally
   trample each other. A busy platform will thus "back up" the system
   (which is exactly what should happen on a busy platform). This
   does NOT do FIFO order -- the actual arrival is random. Trains in
   the real world don't "jockey" as they are on tracks ... this is not
   the real world.
   To make it real, a queue would be added and when a train departs, the
   departing train would kick off another delay job to bring the next
   train off the queue. This is not sought this version.

15. A railroad office has the program to allow a platform owner to

   request that their platform be added (and optionally to which
   routes, but it's just a text string, nothing special).

16. A Railroad Office has the program to allow a platform owner to

   adjust their platform settings or _remove_ their platform (whether
   or not the platform is yet on a route). All settings are sanity
   checked so a platform can't damage the system as a whole.

17. A railroad office has the programs with _locks_ to allow trusted

   people to create and edit any route.

NOTE: Platform owners can add a platform to a list of platforms, but

     only Railroad 'staff' can add a platform to a route. The owner
     can however remove their platform, which will pull it from all
     routes. The removal is irreversible to the owner (though they
     can re-apply to have the platform added again).

18. On arrival to a platform, an announcement is made in the train

   providing the platform message and listing the count of people
   present on the platform.

19. On arrival to a platform, an annoucement is made to the platform

   indicating the arriving train, it's route, how many people are
   aboard it and the next station's name it will visit.

20. On arrival to a platform, both train and platform receive the same

   announcement indicating how long the train will be 'stopped' for
   boarding and disembarking.

21. There must be a way to force passengers from a train to a

   platform.

22. A railroad program exist to "add a train" to a route (which causes

   the train to start from the starting point immediately).

23. A railroad program exists to say "remove train at completion for a

   route" which will cause the next train to hit the end of the route
   to force its passengers off and vanish. The ROUTE is given, not any
   sort of train ID. The next train to end is the one that will vanish.

24. Every route should provide a "best time for loop" by adding up

   the station wait times and the delays between stations. This must
   NOT be stored, as the values are all subject to change.

25. No route can have more trains than platforms.

26. An announcement is made at the NEXT destination that a train is

   due in "approximately" wait seconds and which route and platform
   will FOLLOW. (Message like "A Blue line train is approaching in 15
   seconds. It's next destination will be Town Hall"). See 10.5 for
   the message.

27. A Railroad office has a program to list each train and it's current

   location (either "at platform X" or "en route to Platform X").

28. Each platform owner must have an easy way to list approximately

   how long each route served will take until the next train. This
   is allowed to show expected time for EACH train (instead of next
   train only) if desired.

Top