Jump to content
  • Advertisement
Sign in to follow this  
stenny

Animation (2D) - I need some basic information

This topic is 4414 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!