Sign in to follow this  
AntiGuy

A fairly simple question

Recommended Posts

When animating sprites for games, must you do the animations from the compiler or can you just use gif images. Thx in advance!

Share this post


Link to post
Share on other sites
You can do both: either write the animation in your source code, or use a library that loads a gif file and displays it.

However, GIF files are not free to use, you will have to pay to use them. However, I'm sure there are other animated file formats lying around on the web, with loaders and ways to display them.

Should you decide to go the source code way, remember that you don't have to explicitly write the animations by hand. You will usually be using methods to render frame n of an image, and you can have your program compute n instead of writing it yourself in the code.

A common way of animating consists in adding 1 to n every frame (so it animates), and just having n return to 0 when it becomes greater than the number of frames in the animation.

Decide on a way, and you'll get more help on it.

Share this post


Link to post
Share on other sites
GIF, as in animated GIF I assume he means.
Er, depends entirely on graphics library/routines.
It's a better idea to do the animation yourself though.

Share this post


Link to post
Share on other sites
Quote:
Original post by AntiGuy
When animating sprites for games, must you do the animations from the compiler or can you just use gif images. Thx in advance!

In your terms, I think it's animations from the compiler. You can use GIFs, but it won't animate itself.

Share this post


Link to post
Share on other sites
I think .gif - images would work if you had a library which supports it(I dont´t no one yet but anyone else does I guess).
You also could load single bitmaps of your animation in your game and write some code to play them like an animation.
Hope that helps :)
Quak

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this