I mentioned in my very late post yesterday that I had introduced a “tram ping” system. This is indeed the case, and I will now say a few more words on the subject.
The Caledon tram has an unfortunate habit of occasionally vanishing, being returned to my inventory when a parcel becomes full, and suchlike. This is obviously inconvenient for passengers, particularly as it is most likely to happen in the busy hours - the evening for North American participants - when I am asleep, and thus cannot pop back to restore service. I have not yet mastered the art of Second Life Somnambulism. It would be possible for me to delegate responsibility for this to another but really, why should they be bothered either?
I had thought for a while that I might put in an automatic system to solve this problem but, as usual, the distractions of passing shiny objects have meant that it is only now that I have done so. The principle is really quite simple. A script is added to the tram which sends, every minute, a message via llHTTPRequest to my Tram Ping Server, with its current location. The server then records this information in a file.
The Tram Rezzer, an invisible phantom block lurking near the Chessboard, checks with the server every two minutes to see when the tram last checked in. If that length of time is greater than two minutes, it assumes that the tram has met with a mishap and creates a new one, which begins on its course once more. Some extra time is granted as a margin of error - it might be that the tram failed to check in due to some networking error, but it is unlikely that this will happen more than once. (If somehow the whole llHTTPRequest structure fell apart and the tram was unable to ping at all, the rezzer would also be unable to check and would not rez any new trams until it was able.)
So far, this system seems to have worked and not flooded Caledon with a plague of trams. (I have a horrible nightmare in which the rezzer goes insane and begins sending out a new tram every two minute until the entire route is a solid mass of smokestacks.) One can also observe the process in action by visiting the tram status page, from where it is possible to get a SLurl to the tram’s current location.
One thing that I am concerned about is the possibility of more than one tram existing, and thus I am thinking of instituting a system whereby each tram that pings the server must have a key on an approved list, and commit suicide out of sheer despair if told by the server that it is not welcome - or perhaps, we might actually want more than one tram, in which case rezzers would have to be able to check for a particular key. Certainly as Caledon grows in size, a central page from where one could view the progress of each public transport route would be most diverting for visitors.
Here’s a thing - why do I have no pictures of the tram in my current gallery? Bother.
A demonstration of the principle has just occurred! In the log (currently on the status page) you can see two lines…
[12:01:46] Tram last pinged 136s ago, trying to rez new one
[12:01:46] New tram rezzed, key b372b1d4-1ee3-0a3e-682d-42fa7c5586d7
These coincide with the message that I received just beforehand:
Date: Thu, 15 Jun 2006 04:59:42 -0700 (PDT)
The object ‘Second Life’ has sent you a message from Second Life:
Your object ‘Caledon Trolley v0.36′ has been returned to your inventory lost and found folder from parcel ‘Commonwealth of Caledon’ at Caledon II 93, 190.
Why this happened, who can say? However, the system seems to have worked perfectly in correcting the matter. Beforehand, there would have been no tram for six or seven hours.


4 comments
Comments feed for this article
Trackback link
http://ordinalmalaprop.com/engine/2006/06/15/further-tram-automation/trackback/
June 15, 2006 at 4:28 pm
Desmond Shang
Just. Absolutely. Brilliant!
I hear a constant stream of positive comments when people see and ride the tram.
In fact, people stand around waiting for it - apparently they can converse as they tour the countryside, something not easily done otherwise.
This has led to a powerful immersive effect regarding a ’sense of place’ - rather than the usual Second Life experience of stand-and-talk, teleport, stand-and-build, teleport, ad absurdum.
The fact that the tram is mildly dangerous, too (the slight push) also has been a delight. I’ve taken people on tours via horse and carriage, and found people actually quite concerned that I ‘mind the tram’ on approaching.
Historic Caledon’s narrow streets weren’t planned for the tram originally, but isn’t that always the case? Progress always has a price, but society is adapting quickly to it as well, it seems.
June 15, 2006 at 9:25 pm
Chance Takashi
Did you perhaps ask Trolley why he kept disappearing? Would you like me to? Oh, and Trolley would like very much to stop to play chess from time to time:
[13:16] Caledon Trolley v0.36: Setting off for the Caledon Telehub…
[13:17] You: Do you wish you went further, Trolley?
[13:17] Raven Callisto is offline
[13:17] Caledon Trolley v0.36: It would be nice to see Tamrannoch…
[13:17] You: I wish you could come visit me in the Highlands.
[13:17] Caledon Trolley v0.36: That would be nice…
[13:18] Caledon Trolley v0.36: Please embark or disembark now!
[13:18] Caledon Trolley v0.36: Setting off for Port Caledon…
[13:18] You: Oh I think I’ll ride a while longer.
[13:18] Caledon Trolley v0.36: Good, I’m glad.
[13:18] Caledon Trolley v0.36: I get lonely during the daytime.
[13:18] You: Awww… poor trolley…
[13:18] Raven Callisto is online
[13:19] You: So are you going to get dressed up for the 3rd Birthday gala?
[13:19] Caledon Trolley v0.36: I’m not sure… I have no time to shop.
[13:19] You: That’s too bad. I bet you would look nice in some bunting!
[13:19] Caledon Trolley v0.36: Please embark or disembark now!
[13:19] Caledon Trolley v0.36: Oh, I would adore some bunting…
[13:20] Caledon Trolley v0.36: Setting off for the Caledon Telehub…
[13:20] Caledon Trolley v0.36: Perhaps in the Caledon Tartan?
[13:20] You: I will have to see what I can do.
[13:20] Caledon Trolley v0.36: Oh would you?
[13:21] You: Certainly! We all want to look our best.
[13:21] You: Not that we’re showing off or anything… Pride goeth before the fall and whatnot.
[13:21] Caledon Trolley v0.36: Oh, I agree. Still, it’s good to look nice when you’re having visitors.
[13:21] You: Yes, Trolley! That’s it exactly!
[13:21] Caledon Trolley v0.36: Please embark or disembark now!
[13:22] Caledon Trolley v0.36: Setting off for the Chessboard…
[13:22] Caledon Trolley v0.36: I wish I was allowed to stop to perhaps play a game of chess.
[13:22] You: Me, too. That would be fun!
[13:22] You: Or checkers maybe!
[13:22] Caledon Trolley v0.36: I don’t know how to play checkers.
[13:22] You: Oh, I could teach you!
[13:23] Caledon Trolley v0.36: I would like that very much, Miss Takashi.
[13:23] Caledon Trolley v0.36: Please embark or disembark now!
[13:23] Caledon Trolley v0.36: Setting off for the Caledon Telehub…
[13:23] Chance Takashi hugs Trolley!
[13:23] Caledon Trolley v0.36 hugs Miss Takashi.
June 16, 2006 at 11:38 pm
Prokofy Neva
Finally, somebody in this world who can get the trains to run on time! Now see if the Lindens can GOM this for the atoll continent, could you?
Great work!
June 19, 2006 at 5:42 pm
qarl
damn you Ordinal! just as i was about to unveil my auto-rezing-server-controlled BLIMPLINES.
for those who are curious - i’m offering tours of the secondlife mainland, via a fleet of automated blimps. the full route is 8 hours long - however you may board and exit as you wish.
search places for “BLIMPCO” or send an IM to “Qarl Fizz” to receive your very own blimp-tracking HUD.