J2ME character animation with multiple sprite sheets
Posted
by
Alex
on Game Development
See other posts from Game Development
or by Alex
Published on 2011-02-12T17:01:50Z
Indexed on
2011/02/12
23:33 UTC
Read the original article
Hit count: 288
I'm working on a J2ME game and I want to have walking animations.
Each direction of walking has a separate sprite sheet (i.e. one for walking up, one for walking right etc), I also have a static idle image for each direction held together in a single file. I've tried to hold an array of sprites in my player class and then just drawing the sprite corresponding to the current direction, but this doesn't seem to work.
I'm aware that if I combine all the animations into one sprite sheet I could set up different animation sequences, but I want to be able to do it with separate images for each animation.
Is there a way that anyone knows of to achieve this? And ideally without too much extra code (as opposed to combining the sprites into one sheet)
© Game Development or respective owner