- Home /
How can I animate a sprite sheet in Java
I have a REALLY big kirby sprite sheet for a game I'm making for my friend. I'm not sure how to animate one line at a time when i press certain buttons like "up,down,left,right,z..." etc. Any tips?
Don't you mean "JavaScript"? That's an entirely different language from Java.
@Fattie I'd love to get it, but I'm broke :P That's why I make games But thanks for the suggestion. I just need a simple code sheet that I can use with all sprites of different sizes
@alucardj Thanks I've tried that too but it plays all the sprites. I just want it to cycle through certain rows when i press certain buttons
Hi, the reason you're not getting a solid answer is to do what you ask involves writing a state engine to control what portions of the sprite sheet are played (using my previous link for example). If the characters are to be reversed then it is double the work and time. I have in fact thought of doing it myself but it is time I havn't had recently.
What is the full size of the sheet, and what is the size of each individual sprite ?
I would also suggest following the video's in Chobi77's answer.
Answer by Chobi77 · Sep 30, 2012 at 01:50 PM
Have a look at Walkerboystudio
Scroll down to the section with the heading "Unity Tool Development Project 3 - in HD" and have a look at part 14 to part 31.
That should be what you are looking for.
The WalkerBoysStudio tutorial is what I originally used for making sprites in standalone games. However, when I use the same script in flash, I get at least 7 errors. I'm looking for an alternative script that I can use that will still give me the same result and work in flash. Thank you for your answer by the way :)
when I use the same script in flash ... do you mean publish in Flash, or port the code to ActionScript? Swapping the UV's or texture offset is completely different to setting up a $$anonymous$$C and telling it to gotoAndPlay(frame);
Your answer
Follow this Question
Related Questions
Sprite Editor/Pack Atlas Question for 2D Animating 0 Answers
How to do you import Spriter animations into Unity? 1 Answer
How to animate a sprite mask? 0 Answers
Sprite animation 2 Answers