I'm making an RPG similar to Super Nintendo RPGs in the early '90s. I'm handling movement much like Squaresoft's Final Fantasy IV.
Notice that the player never actually changes his x and y positions on screen. What I'm asking, to be precise, is how could I, in LWJGL through user input (say, the arrow keys), take the sprite sheet I have of my character's movement animations and render them in a [partially] fluid animation like above?
I've been perusing the internet for hours, and I've not found a surefire way to do this. I don't have any code as of yet; I'm more or less looking for a guideline or some pointers in the right direction concerning how I might tackle this.
And, to note, this'll be a rather large game, so I want to focus partially on speed and efficiency—that meaning that I don't want to dive into Slick2D and libGDX unless absolutely necessary.
I think that enumerating over a series of BufferedImage[]
is your best bet for a homemade solution. Someone made a simple example over here. Pull the images from your spritesheet to create the array, then just swap between the sprites as desired. Possibly building an AnimationManager
to move between Animations
could help.