Loading animated sprites

Blitz3D Forums/Blitz3D Programming/Loading animated sprites

Rambus(Posted 2003) [#1]
Im trying to have a sprite have an animated pic
Tryed using a gif format and got an error. What formats can you use to have a sprite with an animation?


jhocking(Posted 2003) [#2]
bmp, jpg, tga, png... the same file formats as for non-animated textures. Animated textures are done as filmstrips (ie. all the frames of animation laid out on a static image.)


Rambus(Posted 2003) [#3]
Ahh, I understand what you mean. Ive seen it done it games befor.
So lets say I have an image with 4 fames layed out on it- How do I code it so it moves to the next? If you dont have time to write out the code could you just point me to the right commands please.

thx


jhocking(Posted 2003) [#4]
It's kind of annoying but ultimately pretty flexible how Blitz works with animated textures. You load the texture using LoadAnimTexture to break up the image into the separate frames. Then you increment the frame on an object by repeatedly using EntityTexture (or whatever texture command you want) and changing the frame parameter each time you apply the texture. The frame is the third parameter (first optional parameter) of the EntityTexture command.


Rob(Posted 2003) [#5]
LoadAnimImage
DrawImage


Rambus(Posted 2003) [#6]
Alright thx ill go give it a shot