Monday, October 13, 2014

Sprites :3

So I was reworking the Luna character, as some players had requested that it be changed a bit, and I noticed some cool things with the glow sprites. Before I used a method to spawn these little ignited sprite particles that would kind of bounce around chaotically. Fire didn't really suit the boss that well, so I decided to change the fire to a sparkle particle, which worked out quite well when the map is made dark by some other effects I use.

I also varied their hue, and greatly lowered their gravity so that they float around. This makes for a much more interesting effect... when spawning them in great numbers (around 50 or so). 
This is not too bad, since sprites are extremely cheap to render (even more so when alphatested). This is good, since valve has not made an easy way to make use custom particle files in Team Fortress 2. It seems that currently, particles can only be loaded from a particle manifest file, which must be included in a map.. Anyhow, sprites being as old as they are have several entities that allow them to be used in interesting ways, mainly: env_sprite (normal, parallel, etc), env_sprite_oriented, and env_spritetrail. Now that I think of it, there are several other sprite-based point entities that could be used in interesting ways (env_lightglow, env_steam, and possibly env_fire). There are also some good brush-based entities as well: func_dustcloud, func_dustmotes, and env_embers.

After playing with sprites, I thought it would be interesting to make a functional character with them. It just so happened that ATHF was on, and it was some Mooninite episode. It did not take me long to block out the character in Photoshop and create the 20+ frames of animation I would need for a basic sprite sheet. He has basic animations for jumping, walking, attacking, and giving the bird. He's also got some frames for a back panel so players can tell which side is his front/back (he's oriented), as well as for his special (the Quad Laser).

I cheated a bit and used his "Arms up" frame for his stunned animation, but it seems to work out. He's got some simple 8-bit sound effects for walking as well as attacking. His mouth also moves... albeit on a fixed timer. I should probably randomize the sequence a bit, but it looks ok. Oh, and there are gibs too! When he dies, he breaks into four pieces. In the end, I think he came out pretty good. There are several limitations using a sprite for a character model replacement, but it definitely works. Now that this character is done, I have a good framework for making any number of future sprite-based characters if need be, all that I would need is to prepare a sprite sheet.

No comments: