Home arrow X-Guard arrow X-Guard
Who's Online
We have 16 guests online
X-Guard

The Problem with Sim Borders

VHI X-Guard is a technology that was developed in response to a set of common problems:

  • When a vehicle goes over a sim border, it takes a noticeable amount of time (usually several seconds) to get handed off to the next sim.
  • During this time, the SL client renders the vehicle as though it was already in the next sim. Since it isn't really there yet, it does a "best guess" as to what the vehicle would be doing if it had been handed off. This means it extrapolates linear and rotational speed and acceleration and simply renders the vehicle as though it was maintaining the same speed/rotation/acceleration.
  • This often results in the vehicle appearing to accelerate (often to insane speeds) and tumble at an ever increasing rate.
  • When the vehicle is ACTUALLY done being handed off, it appears to "snap" into its actual position. This can be very confusing for a vehicle operator, who may have seen the vehicle accelerating/tumbling and tried to apply controls to reverse the apparent motion. Additionally, the longer the "tumbling" effect goes on, the harder it is to guess where the vehicle will really end up when the handoff is complete.
  • If the sim border being crossed is close to another sim border, and ESPECIALLY near a sim CORNER, there is a chance that the vehicle will have to go through another handoff the second the current one is complete. Since the SL viewer is very easily thrown out of sync with the simulators during handoff, and since it is a critical participant in the handoff process, crossing multiple sim borders in a short period of time - or even just crossing one, into or out of a particularly slow-running sim - can result in a complete disconnect between the viewer and what's going on with the Second Life grid. This is often unrecoverable. The viewer never figures out what the simulators are doing, or where the avatar or vehicle is, and the person using the viewer has to close it and log in again. This makes for a very irritating user experience.
  • The risk of a failed or highly delayed sim handoff is additive. If your combination of sim ping, packet loss, etc. results in a failure rate of 10%, and your passenger has a failure rate of 15%, then every time you go over a border the chance is about 25% that one or the other of you is going to get dropped, have to relog, etc.


The Solution

There are two methods I'm aware of that have the potential of counteracting this problem:

  • You can try to force a client update as soon as possible after the sim handoff. I've heard several methods of doing this. You can multiply two impulses, -(mass * velocity) and then (mass * velocity) as soon as the vehicle goes over the border. I heard a variant of this which was to use XOR rather than multiplication. I have tried both methods, but haven't noticed any difference between them and doing nothing at all when crossing over a sim border. Sim crossing without that bit of magic was just as fast as with.
  • You can turn physics off when you detect a sim crossing is imminent, move the vehicle over the sim border, and then turn physics back on. I first saw this in Francis Chung's Dominus Shadow several years ago. It isn't as visually smooth as just doing a sim handoff without any additional magic, but it is the method that actually works reliably, and the one that I have chosen to implement as VHI X-Guard.


VHI X-Guard

  • The visual effect of the second method might seem somewhat jarring at first: the vehicle comes to a full stop, steps over the border, then resumes motion. (As opposed to the regular accelerate-and-tumble effect, which is visually a little smoother, although more disconcerting in my opinion as it makes it difficult to predict where the airplane will really be once the handoff is complete.) HOWEVER, I think it's worth it: The airplane resumes motion in a way that is always predictable. It doesn't appear to tumble. It doesn't risk going immediately over another border, resulting in a very probable drop or disconnect. In fact, if you deliberately aim the vehicle DIRECTLY for a sim corner - and by that I mean positioning it exactly in the center of a sim, and rotating it to aim exactly at a corner - it will successfully make it over the corner almost every time. The C-1 Avocet video on YouTube demonstrates this exact situation.
  • When you enter or leave a VERY busy sim, the handoff might take quite a long while, upwards of ten seconds. Without X-Guard, you might already be lined up for another handoff by the time your client figures out where you are. With X-Guard, the client actually sees the vehicle where it is, always, and that means you aren't in for a surprise when the handoff is complete. Whether you're in love with the visual effects of this or not, I'm sure you'll agree it beats having to relog five or ten times a day because of that annoying tumble effect & the risks inherent with it.
  • By default, X-Guard does not engage unless the aircraft is moving at or greater than 40 knots. Sim handoffs at speeds lower than this are usually reliable enough, although the cornering problem is still an issue. If X-Guard detects that the sim you are leaving is running slowly, it will activate even below 40 knots. However, if the sim you are ENTERING is running slowly, it won't, because it has no way of knowing that before it gets there. X-Guard can be set to run at all speeds, or completely turned off.
  • If you are experiencing packet loss, or the sim you are entering/leaving is running slowly, the handoff may fail regardless of whether X-Guard is on or off.
  • Sim handoff will take much longer if you (or one of your passengers) have a lot of scripts running in your attachments. Even simple things like clothing and hair can have a surprising amount of scripts in them. I have seen massive improvements in sim handoff time by doing nothing more than changing into an avatar or outfit that wasn't as script-heavy. This goes for the vehicle as well, naturally, and to that end I spent many hours refining VVDE 4.5 to use as few scripts as possible. The # of scripts went down by about 30% compared to earlier versions, and that allowed it to cross over sim borders noticeably faster.


Aircraft Featuring VHI X-Guard

  • C-1 Avocet

I may port this technology to other aircraft, but it isn't trivial to do so. If you own an older VHI aircraft and you'd like to see X-Guard implemented, please let me know! Please note that the technology can only be integrated into aircraft released in or after Summer '06. That means aircraft in the "Modern Aircraft (2006+)" menu.


Mambo is Free Software released under the GNU/GPL License.