Animation (2D) - I need some basic information

Started by
1 comment, last by stenny 17 years, 5 months ago
G'day, I've just finished writing some parts for my engine, or to be specific: it's graphics core. I have classes for The graphics system itself A stationary image (= no animation) A font Now I want to create a class that can load and store one animation. The only problem I have is, how are animations done? I have seen animation sheets; sort of tilesets and each tile is a frame in the animation, but why wouldn't I use .gifs? My question: What's the best or most common way to include animations in your project? -Stenny
What do I expect? A young man's quest to defeat an evil sorceror while discovering the truth of his origins. A plucky youngster attended by her brutish guardian. A powerful artifact which has been broken into a small number of artifactlets distributed around the world.What do I want? Fewer damn cliches. - Sneftel
Advertisement
You could flip through a group of textures, or you could load one texture sheet with all the images on it and just display the current section. I would use one texture with all the images of the animation on it and just draw a section of it. It'll keep directx from setting a different texture a lot. But I guess it's 2D and I doubt you'll notice a huge slow down or anything.

You probably won't want to use gifs. DDS files are probably a better choice, but some people like TGA, PNG, BMP; directx can handle any of them...

If you need an easy way to make DDS files, directx come with a texture utility program that will convert just about anything, or if you have photoshop nvidia has a nice plugin for DDS files.
Ok, thanks. Well, .gif was just an example. I was just wondering which of the options (animated file, or a stationary file) was faster and/or easier to use.

-Stenny
What do I expect? A young man's quest to defeat an evil sorceror while discovering the truth of his origins. A plucky youngster attended by her brutish guardian. A powerful artifact which has been broken into a small number of artifactlets distributed around the world.What do I want? Fewer damn cliches. - Sneftel

This topic is closed to new replies.

Advertisement