PDA

View Full Version : How to implement sprite animation into TBGL?



Michael Hartlef
05-02-2009, 18:23
Hi folks,

right now I'm helping Petr to implement new features into TBGL. Besides some 2D primitives I'm working on sprites at the moment. And there I'm on the animation section right now.

So I wonder how I should implement it. I mean, command wise, how to deal with it? I guess most of the time you will have a bigger texture (sprite sheet) with a lot of sprites on it. Frame after frame. But sometimes I saw sheets that included several different sprites with their animation.

Right now I have the code build for loading a spritesheet and TBGL thinks that it is a sheet for only one sprite, with its animation on it. Would that be enough or how would you like to see it?

Michael

Michael Clease
05-02-2009, 18:30
I would opt for one sprite per sheet.

Petr Schreiber
05-02-2009, 20:21
Hi Mike,

do you mean one texture = walk cycle of game character A, other texture = jumping cycle of game character A ?
I think that should be ok.

Michael Hartlef
05-02-2009, 22:34
@Michael Clease: There is a command for doing this allready, simple sprite loading with a complete texture.

@Petr: I was thinking about that all anims (jump, stand, die, whatever) could be on one sheet.

Michael Clease
06-02-2009, 15:08
@Petr: I was thinking about that all anims (jump, stand, die, whatever) could be on one sheet.


and that was what I talking about.