News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Sprite animation command query

Started by Fash, April 03, 2006, 04:34:16 PM

Previous topic - Next topic

Fash

Hi Kevin,
Was wondering if there was going to be a definite sprite animation command (or set of commands) added to any future releases of PB. I have been using the one (the function) you coded for some small projects, but just wondered about the possibilities of an inbuilt command set for such things :)
Cheers,
Steve

PS I was also thinking that this might help to make play more attractive to newcomers also :)
For PC game/demo music visit
Future Developments

kevin

Probably, but the question still remains how should it be implemented.  

 Like you could have dedicated linkable animation/movement lists.  Where the list acts like a controller for the behavior of the sprite.  But the command set to activate that is prolly going to be more work than rolling your own.

Fash

#2
Have you looked into the way in which blitz and dbp handle animations ? The blitz way seemed the easiest (imho). I have used dbp, blitz, purebasic, ethos amongst others and that way seemed quite logical and simple.

I think the anim strip would be the best way, although using a .gif could also cover all bases.

-loadspriteimage "blahblah.png",spritenumber,xsize,ysize,numberofframes,spritemode
-playsprite spritenumber,xposition,yposition,sequence,animtype

Maybe there could be a way where the anims are set up in sequence where sequence could contain set frame numbers (eg 1,2,3,4 or 1,3,5,7 depending on the frames wanting to be played) then an animtype (eg 1 to play frames then loop, 2 to play from start to finish then back to start again eg frame 1,2,3,4,4,3,2,1 and then repeat in a ping-pong type manner)...If you didn't want to play in a sequence you could maybe select a single frame and have an animtype to display a single frame (or just load a static sprite)

Cheers,

Steve

PS As you've probably gathered I'm not the greatest of coders, so I hope I've explained it in a way you can understand ;)
For PC game/demo music visit
Future Developments