Community > Blog

Friday, October 15, 2010

Blue World Notes: Caledon Steampunk Ralph Doctorow Creates System to Control Blue Mars Time!

In Blue Mars' Pavonis, which is an archipelago being developed by the steampunk community of Caledonia, there is a subtle but fantastic invention: The Kronos machine, which controls the time of Blue Mars itself. (At least for those in a given Blue Mars locale.) It's the brainchild of steampunk engineer Ralph Doctorow (his avatar name in both Blue Mars and Second Life.) "What Kronos does," he explains to me, "is calculate how fast time progresses, faster at night, slower during the day, to get a non-equal day/night cycle but still keep time smoothly progressing with no visible jumps." This is important, because the Caledonians want everyone in their land to share the same chronological experience as they design it. (Overriding the system's default time settings, which are otherwise pinned to individual users.)

"Ultimately," Caledon leader Desmond "the Guvnah" Shang tells me, "that timing should be able to control the shared experience of everyone seeing the same lighting... the same clouds in the same places, pseudo-random movements of animals, birds, fish and so forth -- and the train, of course, making its rounds on a schedule." (Yes, Caledon will eventually have a train, but more on that later.)

This incredibly elaborate project started, as many steampunk enterprises do, with a simple goal: at the start, Mr. Doctorow simply wanted to get the sun dial in Caledon working. But as he himself puts it, "it all got a bit out of hand."

How does Kronos work? Short answer is Lua scripting, but for I'll let Ralph Doctorow explain the rest:

"What Kronos does is calculate how fast time progresses, faster at night, slower during the day, to get a non-equal day/night cycle but still keep time smoothly progressing with no visible jumps. Since each user is on their own client, each is running their own local copy of Blue Mars including Kronos, and it can keep time synchronized by re-syncing every few minutes back to GMT using the client machine's system time. For predictable things like the day/night cycle or trains (assuming the Guv'nah makes the trains run on time) it's an accurate and very low overhead way to synch everyone so they see the same thing together. As Desmond says, there's zero server side overhead, it's all on the local client and normally only runs very briefly every couple of minutes.

"Since everything is local to each individual user, there can be local effects as well so long as they are triggered by something common to all users such as an avatar trigger at a physical location. For example, there's a beach in Pavonis where it's always sunset when you walk up to a monolith in the sand. If two people go there they can enjoy the sunset together while everyone else continues with the normal day/night cycle, and when they leave, they re-synch back to whatever the current general Pavonis time is. It works because all clients have the same Pavonis layout, so they all have both the same Kronos setup and the same trigger volume pre-loaded. When they walk up to the monolith and enter the trigger, their local machine triggers their local Kronos to reset their personal Pavonis time to sunset and stop time from progressing just for them. None of this requires any server traffic but is very accurately synchronized since everyone's copy of Pavonis is identical as hopefully is everyone's machine's idea of what time it is (GMT)."

Mr. Doctorow's flowgraph for Kronos -- click to see the full wizardry!

Even cooler, Ralph Doctorow suggests the technology he's innovated will soon be available to other Blue Mars developers: "Kronos is set up as a flowgraph node and is controlled at run time by its inputs which makes it very flexible. Its outputs are used to control the rate of time of the Blue Mars client or anything else that needs to be synchronized. Flowgraphs are still a little rough around the edges and the developer-to-developer commerce system hasn't been rolled out yet, but once all that's cleaned up, I anticipate (and hope) that there will be a lively market for flowgraph components. They will allow developers and content creators to add very complex behaviors to their products without having to learn how to program Lua, which incidentally is a really clever language and a pleasure to use."

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.