lundi 30 avril 2007

Five plays with Fire

Second Life has some reminiscences of the primitive shooter games which featured on the early computer. The games where your thumb got numb from pressing the button, to shoot on all kinds of nasty flying objects. Because continuous firing wasn’t invented in these middle ages of computer history, you had to click of push buttons or the mouse incessantly. It were the days before RSI, the repetitive strain injuries and all was well. If something doesn’t have a name, it doesn’t exist.

Firing can be done in Second Life. An object produces other objects, the bullets, which exist only temporarily in the Second Life world. These bullets, or whatever are removed automatically after about a minute. Five isn’t too thrilled by weapons, but the possibility of the making of these temp-rezzed objects is very interesting, because it can also serve more peaceful ends. It is like melting cannons into ploughshares. This alone should be a reason for Five to use this way of making objects. The objects coming out, rezzed, are stored in the inventory of the thing that makes them. This is also very nice: it’s the kangaroo idea: an object has other objects in its belly. These temporarily produced objects can again be filled with other objects. It is not only a kangaroo, but also the idea of a Russian baboesjka, the puppet in puppet in puppet idea. This principle can be fire for programmers, but this blog is not about that kind of fire.

Other virtual fire was needed to use in the game of gold searching in the desert.

The idea was to let players gain a bar of dynamite to get access to secret places where they could find more hidden items. But an object giving of an explosion, smoke, and rubble? That’s programming particle systems, sounds, and this rezzing of temporary objects, which must be exploding, shooting away. This exploding can be done by using the Havok built in SL. This Havok produces natural falling and bouncing of objects, and the effects are never to be programmed by hand, because it involves lots of calculations which have to be done very fast. It is done on a deep basic level in the software.

Experimenting began. Five made an object which rezzes other object around itself, producing clouds and sounds. All went well, steadily more features were added. And then suddenly it went wrong. The kangeroo thing didn’t react anymore on commands. Five checked everything but eventually was puzzled by the malfunctioning. After a few hours of doing something else the solution was found: the lindenscript is delayed by all sorts of things, the rezzing of objects, the talking of objects between themselves (the rubble has to know in which direction to fly away), the smoke effects and the sounds. By loading more and more effects on top of each other the script got mixed up in itself and refused to function.

The solution was to separate all the different effects by enough time to let the script carry out the commands. So a whole string of effects states are ordered in a sequence in the so called timer event.

Then the explosion is well performed, although even then, depending on the traffic in the sim, some effects can be forgotten, making every explosion a bit individual, which is quite good.

Of course the fire is obtained by the text animation script you can obtain free.

Five was often working in the middle of fierce and violent effects. This made Five think, because Five is much more in the habit of making peaceful games. Shooters are not in Five's repertoire! Could it be possible to make a friendly explosion? So the rubble was replaced by flowers, the smoke by flowery images, and the fire animation was replaced by cheerful colors, jumping to and fro. But then again all was going wrong. The flowers proved to be too heavy for the sim, and the sim Five was working in was going down! You know, also peaceful acts can endanger the world? Luckily this Second Life world is partitioned, one sim going down, doesn’t mean the whole world is in danger. The sim quickly recovered from the flowers, removed them and regained consciousness. But the flowers were not saved, so no pictures from these peaceful demolitioners of sims in this blog!

Aucun commentaire: