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

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.

Automating Level imports from Blender to Godot

  Recently I've been making some levels in Blender an importing them into Godot. There are only about 7 or 8 shaders for each level, not counting dynamic objects which will be added later. But to improve rendering performance, it can be a good idea to split the meshes up into sections. At that point you might be faced with a list like this: Or it might be even more chaotic, if you didn't use simple names for the objects in your level. So it can take a long time to sort out all the meshes, make them unique and add textures and so on. Blender imports with simple Blender textures, or with placeholder materials. This is sometimes OK, but if your Godot shaders are very different to those used by Blender, it means applying new materials to every mesh object in the level when you import the scene. I found that during the design process, I was importing and readying a level several times before I was happy with the final layout. So at first I was wasting a lot of time. In Blender, I us

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