.comment-link {margin-left:.6em;}
Moriash Moreau: My Second Life
Tuesday, June 13, 2006
 
Monster Machine, Update
As I mentioned before, I am tinkering with a first person shooter inside SL. I'm making slow progress toward a working game. I know enough about game design not to give a release date, but I think I can commit to "soonish."

I finally got around to finishing several walking monsters. As mentioned before, I decided to go ahead and make/obtain in-game avatars for these. This makes it easier to create art for front and back views (simply turn the model 180 degrees and snap another pic), an makes it easier to make matching action poses using built-in animations. These turned out pretty well, for what they are (floating static cut-outs). Attacks are simple one-frame affairs. Each monster texture (remember, there's one for front and back) is actually composed of two frames: the basic standing/walking pose, and an attack pose. When a monster attacks, it switches to the attack pose briefly. Usually this is a picture of the avatar in mid-punch, although the Skeleton has both punch and kick. This is mostly because these were the first images I created. In testing, I found that it wasn't worth making a kick pose when the image could not be seen, such as in Mouselook, where the avatar would only be able to see the monster from the torso up. So, ultimatelty, each monster required four different images, and a little photoshop work to glom them together properly.


From left to right, we have:

I may have a few more, eventually, including female zombies (dressed in the latest fashions and accessories- haven't decided between "Mall Zombie" or the more obscure roleplaying joke, "Spawn of Fa'Shun") and child zombies ("Kneebiter" always sounded like a particularly ghoulish term for a kid). Maybe a couple more, if ideas strike.

Fortunately, I took the time over the weekend to make it easier to add to and modify the monsters. The monster dispensing system is divided into three general parts: player HUDs, a central server, and a system of remote monster generators. (The first two serve other purposes, as well.) Basically, the HUD sends out a call for a monster to be dispensed. The server hears the call, notes the owner of the HUD that called it, and signals a random monster generator to spawn a monster. The generator does so, and tells the monster who its initial target is (if it is a player specific type).

Initially, I had the monsters loaded into each of the monster generators. So, in order to change or add a monster, I had to edit each and every generator. Quite cumbersome for testing and tweaking purposes. Finally, after the Nth time, I wised up and moved the monster dispensing system to the central server. Now, the server sends a random monster to the monster dispenser, which has the sole task of rezzing it. This made things a little bit more complex, but will pay off hugely in efficiency down the line. Now, I only have to edit one object (the server), no matter how many generators are ultimately used. Currently, I'm using eight of them, spaced evenly in a rough circle around the arena (see below).

And it also lets me easily tweak monster distribution and create special events. For example, right now I have two general types of monsters: walkers and flyers. The server has a 50/50 chance for picking one of each. But I can easily change this balance by changing a single variable. And, down the line, I can add boss monsters, power-ups, special events (such as swarms of a certain monster type- the Rippers are a lot of fun in swarms) and so on, simply by modifying a single script. Quite handy.


Here is another shot from the inside of the arena. My plan is to ultimately build it at 1500m or so, both to keep the massive 60m x 60m x 7m structure out of the way and to take advantage of the superior frame rates at high altitude. I typically get something around 12-15 FPS at ground level, compared to 30-35 FPS at the SkyLounge. (Boy, I've gotten a lot of mileage out of what I learned from that little project. I guess you never know what's going to turn out to be a vital bit of educational experience.) It helps when the client doesn't have to render another prim for a couple thousand meters. The scripting to rez this huge structure by remote control will be interesting, but it's well worth the trouble.

In order to make this all work, I needed a large, open, enclosed area to contain the monsters and players. It had to have a roof, to prevent players from easily flying out of range of ground-bound threats. This is aided by building well above the unaided flight limit. Flying players simply skim along the floor. This can be a handy strategy for fast, if clumsy, dashes. And if someone wants to use a flight assist to bump along the ceiling, well, that's up to them. I feel no need to complicate things to deal with the issue.

I suppose if it becomes a real problem, I can always skew monster distribution towards flying types if the player insists on hovering. Given that these seem to be the most lethal varieties (Rippers are fast, Poltergeists fly in an unpredictable spiral, Jack o' Lanterns do massive damage- and all are a small targets), I'm guessing that this would break the habit fairly quickly.

As you can see, I settled on a large, indoor parking garage. For narrative purposes (and so I don't need to waste prims making windows or fences), I'm calling it an underground structure. Thanks to Laura Ingersoll for the idea. (I agree: giant, enclosed parking structures are inherently spooky at night, even when well lit.) I'm still working out some of the ins-and-outs for the baked-on lighting and shadow (especially for the ceilings, around the fluorescent fixtures), but I'm fairly happy with the way it's coming out so far. Now I just need to come up with a name. Unfortunately, "Monster Garage" is already taken.

At the suggestion of Will Webb, semi-official beta tester, I've added some columns to the garage since this picture was taken. Unfortunately, as much as we'd both like to see them, I don't see a way to add cars. They're just too much of an obstruction. After some initial testing, we found that the monsters can successfully navigate around columns and even cars, but they look especially silly doing the latter. We bandied around various ideas, but I think I'm going to back burner the car issue, for now. I don't really see folks parking their prized BMWs overnight in a garage populated with zombies, anyway!


I finally got around to making a better model for the game gun. It's kind of an oddball combination of magic and steampunk-esque technology. (Nods and thanks to Ordinal Malaprop and her Clockwork Blunderbuss for inspiration. I hope it's sufficiently different from her superior device to avoid being a complete ripoff. And, while we're at it, this project also owes quite a bit to an hours-long session shooting Steel Pigeons that sparked some of my earliest ideas for the game.) As discussed in the previous report, the gun has two fire modes: machine gun and shotgun. Or, to fit the more retro feel, Automatic Rifle (top) and Blunderbuss (bottom). The gun swaps types with a voice command. The green gem inset in the stock glows and slowly rolls an animated jade texture (which does nothing but look perty), and the large drum on the bottom adequately hints at/explains the unlimited ammunition. I suppose it wouldn't have been too difficult to add limited ammunition to the game, but it didn't seem necessary. And unlimited bullets add to the therapeutic effect. Given that I'm building this primarily to blow off steam after a hard day's work, I want as few impediments between me and shootin' baddies as possible.

Next, I plan on adding a duplicate health readout to the gun. Currently, it displays a "GUN DISARMED" notice when not in play, but it should be an easy enough matter to expand the display to include player health. This duplicate readout allows other players to judge your current status at a glance.

I also have plans to add various power-ups to the game. I think I can add that to the improved server system with a few modifications. Some small percentage of the time, a power up will be rezzed along with a monster. Said powerup will be a short-lived object that applies its effect and disappears upon collision with a player.

Stimpacks/first aid kits are easy enough to implement. The entire damage system is based around chat commands carrying the damage amount and the key of the recipient. Healing is simply a matter of applying negative damage. A booby trap (perhaps an old style bomb with burning fuse) would be just as easy.

The DOOM and Quake style Berserker Pack seems like it should be fun. Mechanically, it's not that complicated. (Actually, nothing in this project is all that complex viewed singly. It's the combinations that keep tripping me up.) For a brief time, the player stops taking damage, and does damage upon collision with monsters. (Perhaps he throws a one-two punch, too.) Just for the look of it, a portion of the HUD will expand to cover the player's screen with a semi-transparent red pane. Should be kind of neat.

And as I write this, the to-do list gets longer and longer. More later!
Comments: Post a Comment



Return to Main Page