Skip to main content

Animations and effects

One of the things I first learned to do when modding video games was to make animated textures. I started out with CIV 2, and moved on to CIV 3 from there. Back then there weren't any 3d graphics, rather we rendered 3d images in to sprites. Usually such sprites were stitched together to make a sprite sheet, or put together using some arcane script to create a .flic animation.

At the time I didn't know anything about even basic scripting, and I really wish I could go back and teach myself. I used to stitch the images together manually, using Corel Paint, or some other crappy image editing software. Some animations had 15 or more frames, with 8 directions, equating to 120+ painstakingly hand placed tiles. It took hours!

These days I use python and PIL to do the whole process automatically. I can even get fancy effects like blending images to loop the animation.

An acid splash animation.

I seriously recommend PIL to any other developer, it's a great little image library and you can automate a lot of your tasks with it. Whether you're making explosion animations, or animated sprites for your characters, or just compiling a bunch of art in to a single texture or image atlas it's easy to stitch together the frames using code in just a few seconds.

It can even make animated gifs, though the process for doing so wasted so much time I went ahead and used MakeAGIF.com

Right now I'm making a bunch of animated textures for the game, from magical effects to mundane stuff like torches or sparkling item effects. One effect I'm trying hard to get is a simple sparkle effect, this will be used as the 3d model for small treasures like gems or keys or the like, which will be too small to see in the main view of the game world. You'll just spot a sparkle on the floor and have to head over to check it out. Only by picking it up will you know if it's an important key, or just shiny junk.

I love the idea of players seeing a sparkling object across the other side of a pit. They will have to decide whether to try and cross the pit, and whether the expected item would be worth the effort. Of course, usually it would be, otherwise players are going to get annoyed, and that's not an optimal result.


Comments

Popular posts from this blog

Advice needed on tilesets...

I need some advice on which is the best way to handle building the dungeon. Right now I'm using prefabs for my dungeon, they have a north south east and west section for each "room": The basic tileset. This has several advantages, and also several disadvantages. Firstly I can have curved rooms, I can have tunnels and other interesting shapes. The tilesets can look quite nice with a little work. On the other hand I can't easily get the navigation data before building the map and once the map has been built I can't make changes to the layout, like having active pit traps or believable secret doors. Although the rooms are interesting, they are quite repetitive, and it takes a lot of effort to make even a few different variations. Also rooms are constrained to one size. A newer version of the tileset with a lot of variant parts for making more interesting rooms. To create a tile set is a real headache too. Planning how to lay out the UVs, trying to cra...

Upstairs / Downstairs.

I've decided to make my prefabs multilevel. Later this should allow me to add pit traps and other great stuff. It also makes it easier to line up stairs so that you can exit them on the same co-ordinates where you entered them. The prefab editor is pretty much finished, it just needs some code for loading up prefabs from a saved dictionary, so that they can be checked or edited. The entries will need to be forwards compatible, so I'll be loading each tile and then translating the indexes to a new array, that way if I add extra indexes or extra info (like traps or puzzles) I'll be able to update existing prefabs to work with the new standard. Click for a video.

Video Diary 8

Things are moving along well, there's been a lot of progress on the action manager side of things. Actions have finally moved to the UI, so you can initiate actions by clicking the appropriate button. I've set up some dummy actions to show what happens visually when actions are taken, but the actual dice rolls and such are yet to be integrated. The UI objects are also being added, though some are non functional or empty at the moment. Click on the image to see this week's development video. Every time I add something big I also add about a dozen small things. Like the selection box visualization. Previously this was using render.drawline, and old fashioned Blender function which can be impossible to see at certain resolutions, or at certain frequencies. I replaced it with a function that adds planes of the right size and scale in the right location. I also made all characters a little bigger. I still need to do some work with vectors and final target locations t...