Hokay. New here. Hi, nice to meet you, no really the pleasure is all mine.
Anyway it's finals time here at UCLA my school, and I'm trying to make a game. It's a simple fighting game, where two sprites can attack each other until one of the two's HP is brought down to zero. I'm sure it sounds simple enough, but I guess my brain doesn't work in java well enough yet. >_<
The first thing I want to do is get the sprites animated and working in a frame, the rest I can worry about later. So, with this being my initial intent, I made an ArrayList of BufferedImages (Is this the best thing to do? What are my alternatives, and how do I do them? It might just be me and my juvenile java, but an ArrayList filled with SOME type of images seemed best.) figuring that I could make a loop that ran through the ArrayList, displaying the BufferedImage that was in the different index values, making an animation. So I spent a good amount of time breaking apart sprite sheets assigning the individual sprites to the different ArrayLists. Like there's an ArrayList for walking, and when you press an arrow key, the character will switch from his standing animation, and go to his walking one as you move across the screen.
So now I have a bunch of Arrays (hypothetically) filled with images. . . . Now what? How do I make it so that in the tester program, the frames are animated one by one? I figured making an Animation class with all the specifics would do, but what do I put inside the animate method that makes the BufferedImage stored in the different indexes show up? I'm pretty much stuck here.
Thanks in advance for your help ^-^