You know, for what is essentially no more than a plank with an axle, the seesaw, as manifested in Second Life, is a surprisingly complex affair, and ended up taking me about seven goes, and teaching me far more about gaming physics than I’ll ever need to know. Still, as previously mentioned, this kind of pointless obsession is pretty much the solo content for SL.

A Walk In The Park
Description: “Hello there, SenseOfPride. I’m in a bit of a pickle! For no apparent reason, I need an accurately working seesaw, and haven’t a clue how to make it. I think it’s something to do with Quaternion. Can you help me?”

Requirements: One Working Seesaw.

You will be rewarded with:A Strange Sense of Satisfaction.

Accept?

I wouldn’t mind if I had some kind of journal to put this stuff in. I think the worst part of it all is that about an eighth of the way in, I’ll have an ‘Ohhhhh’ moment, and then start going off on one and designing a Trebuchet, or Merry-go-Round, or Low-Orbit Mass Driver or something; as I figure out each new ‘spell’ – the LSL scripting functions – dozens of applications for it spring to mind. The trick is focus, I guess, although I take multi-questing to extremes in World of Warcraft too, and am often found getting nowhere very fast on up to fifteen different quests at the same time.

But I did it in the end. (Nothing to screenshot…it is just a plank afterall.)

  • Version 1: This was a hovering piece of wood which contained a timer which triggered the llSetRot function, which basically just rotates an object on a given axis. Short, simple and totally unsuitable, as the function also delays the whole script for a number of seconds afterward. It created a plank that simply hung in space, and jerked around, much like the second hand of a clock.

  • Version 2: Very similar, this one used the llTargetOmega function instead. This is basically a special-effect, rather than an actual movement. It runs client-side only, and creates the illusion that the object is spinning. Very smooth, but different people would see the plank in different positions, depending on the speed of their PC, graphics card, etc. Also, any interaction with the plank, causes it to flip quite disconcerting back to it’s ‘real’ position. Not good for a thing people are supposed to sit on.

  • Version 3: This is where it all went a bit crazy I think. I decide that the llRotLookAt function is the way forward, as it does smooth movement, and is also ‘real’. However, to allow this function to work, the plank has to be toggled with Physics on, opening up a whole world of mathematical hurt. Essentially, the plank became a Vehicle, using the Havok Engine physics. Gravity kicks in, and the plank thuds to the floor. Various half-arsed attempts to invert gravity ultimately result in the plank leaving the ground with such acceleration that it seems to me, the observer running at 10 fps, that it simply vanished. I have still not had this plank returned to me by the ‘Lost and Found’ system, and suspect that it is currently somewhere in the upper stratosphere, doing awkward things to SL’s maximum altitude boundary numbers.

  • Version 4: Resigned to having to use Physics, I decide that the best way to create a working sesaw, like in real life, is to build it like one. I spend many hours fashioning an elaborate base, axle and tubular axle collars to hold everything in place – just like a real one. I then add the ‘turney’ code, designed to make the seesaw rotate alternately +20 degrees and -20 degrees off the horizontal. I turn it on, and it goes berserk, fighting like a caged animal, juddering the axle through the collars, and then flipping itself out. It goes spinning off at one hell of a lick, but unlike V3, I am able to fly after it and catch it before it causes any trouble. I begin to see why they call it Havok now.

  • Version 5: After a bit of reading, I hit on the llSetBouancy function, a simple, single line of code that can effectively negate gravity for any given object, yet still keep it Physical. I decide to fake the base, and just hang the seesaw in midair. This works well, but now the turning code is acting up. The seesaw has trouble knowing when it has reached it’s ‘down’ position, and instead of switching to ‘up, repeatedly hammers the floor at one end, causing the rest of the seesaw to drift up and over that end. Even though it is not affected by gravity, there are still forces at work here that I clearly don’t understand.

  • Version 6: After a number of frustrating days, I manage to if not understand Quarternions, then at least find enough forum posts so that I don’t have to. I also beg borrow or steal enough code fragments from their examples board, to create a working set of For Next loops and Ifs. This is all stuff I used to have to know for a living, long ago, but have long since forgotten, now being in a different line of work, but flashes start to return. The seesaw works well, hanging in space, and gently rotating as I want it to. I get on one end. The seesaw starts going wrong, and this time, it’s a problem of design. I seem to have made the thing too realistically, and unknown to me, I (and all other avatars) have mass. Getting on one end significantly alters the entire thing’s centre of rotation, and makes the seesaw rotate about a point 1/3 the way along it’s length, instead of the middle. The centre point also goes up by about 40cm. This then makes the other end start smacking into the floor each rotation, and gradually the whole thing starts drifting up into the sky. I have created SL’s most inefficient aircraft.

  • Version 7a: Realising I have mass, I then go off on one with the idea of dynamically resizing counterweights, which detect how heavy the person sitting on the opposite end is, and resize themselves accordingly. This causes trouble, and I read in the LSL wiki, that Physical objects are not allowed to be resized in-situ, precisely because their mass would change. Gah! I give up and swear a lot, and consider stating a newbie Dwarf Hunter in WoW.

  • Version 7b: I return to the idea of axle collars. Some discussion with a scripting and physics expert reveals that I was on the right track, but that my axle collars were far too tight. While RL physics are infinitely complex, and require no processing power, SL is not nearly so elegant and it turns out that all physical objects have a seem to have an invisible bounding box of about 10cm. Any nearer and it cheats, throwing the two objects apart from each other via the nearest direction, even if this means they go through each other. I remake a base and axle holders, this time, making them much bigger than the axle they hold. Experimentation shows that a circle around the axle, with a gap of about 20cm on all sides does the job, although looks bizarre, with the axle seemingly floating impossibly within a wide empty hoop. It still isn’t working very well though…juddering and jerking in its movement.

  • Version 7c: I learn about Friction, and set the axle and rings to a material type of ‘Glass’. This has no effect on the texture, only its friction, which helps a little. I’m very close now, so am extremely irritated at the apparent ’stickiness’ of the plank. Then I realise that my two axle hoops are within 10cm of the sides of the rotating plank, and although not touching, are still ‘rubbing’ against it. I redesign with a longer axle, and further apart rings, and everything works perfectly. Ding - where's my goddamned cookie?

Second Life is perhaps the ultimate expression of Trade Skills, a far cry from the usual ‘Put Monster Gunk A and Cash-Sink Fuel Component B in Container C and press Go!‘, as real imagination, expertise and skill are required, but despite it’s daunting first impressions, the skills are not really that tricky to get a basic handle on - I've only been at this for a few weeks, and seeing my silly little seesaw in action was surprisingly satisfying – more so than anything I’ve ever ‘made’ in any other online games, even SWG-Classic, widely regraded as the most involved for crafitng folk.

That got me thinking, and my next big project, is to replicate the SWG-Classic Musician profession. Stay tuned for how that works out…