.comment-link {margin-left:.6em;}
Moriash Moreau: My Second Life
Friday, July 14, 2006
 
Rovers
Well, finished the Rover last night. I think this is the last monster I'll be adding for a while. I guess the Mall Zombie will be shelved for now. I hope the distaff contingent of the SL community won't be too offended by the lack of female representation in my cast of horrors. If it helps, feel free to imagine the Rippers, Jack o' Lanterns, Poltergeists, and Rovers as whichever gender you prefer. I don't think they'll mind. At least, no more than they mind being shot at. I've found that gender identity issues take a back seat when the lead is flying. Even so, I won't object if you want to play while dressed up as Lara Croft or Jill Valentine to balance the scales. Just send screenshots.

Uh, yeah. I'm moving on before I dig myself any deeper.


So, here's a Rover, in all it's single-prim glory. I suppose there wasn't much point in including a screenshot of a slightly shiny, but otherwise unadorned, white sphere. But I've got to be consistent here!

As usual, it turned out to be more complex than expected. In this case, it was a relatively easy fix, though. Currently, the remote monster rezzers create monsters with their roots at a standard half meter from the floor. This has worked fine, 'til now. As you can see on the Mummy in the background, and more clearly in previous pictures, the base of a typical walking monster is a long, flattish semi-sphere. This is the root prim of the monster, and houses the lion's share of the movement and control scripts. The remaining prims (the flattened gray cylinder and the flat pane with the monster art) are mostly for show, and to provide a reasonably sized target to shoot at.

In this case, however, the baddy is a giant (1.75 meter diameter) sphere. If rezzed normally, it would end up wedged partway into the floor. Bad Things (tm) happen when you attempt to force a physical object into another solid object. I was loathe to reprogram my rezzing scheme to deal with variable rez heights at this stage of the game, so I settled for a one-shot hack for the Rovers.

Initially, the Rovers appear as 0.5m diameter spheres. Immediately after rezzing, they turn themselves physical and lift to a safe distance (one meter) from the floor. Then, they turn themselves non-physical again, and inflate to their intended size. Finally, they turn physical once again, and are ready to bounce into action. Irritating and cumbersome, but it seems to work.

You may wonder about the swap to non-physical status prior to inflation. It kind of threw me for a loop until I figured it out, too. llSetScale, the LSL command for changing prim size, will not work on physical objects. This is because the resulting changes in mass (for example, the Rover becomes about 42 times more massive in this transaction) would cause all sorts of problems with the physics engine. So, we're left with silliness like the above to work around this limitation.

Mechanically, the Rovers are a departure from previous designs. The main difference is they use llApplyImpulse for motive power, instead of the more controlled llMoveToTarget used by all previous monsters. Every scan cycle, they nudge themselves in the proper direction on the X-Y plan to approach the target. Then, every time they collide with the floor, an impulse is applied directly upward. The net result is a reasonably good approximation of a guided rubber ball.

For special effects purposes, I resorted to using drum sounds. Each bounce, the movement script picks one of three bass drum thuds at random. Each instance of damage results in one of three sharper snare drum beats, with an accompanying small burst of white particles. Upon death, the Rover bursts into a larger cloud of white, and disappears with a "pop!" Fortunately, I happened to have a variety of popping sounds from a previous project. And on attack, the Rover briefly flashes red and plays one of the Skeleton's attack roars (I'm not above recycling sound effects when one fits). None of this is Prisoner cannon, mind you, but it does add some interest to what would otherwise be a plain white ball.

Speaking of, I've been somewhat disappointed by the lack of recognition of the iconic Rover from the classic BBC television series, The Prisoner. So far, I am zero for four in recognition. But I have gotten positive responses on general creepiness, so I guess it'll work either way.
Comments: Post a Comment

Links to this post:

Create a Link



Return to Main Page