aspose file tools*
The moose likes Game Development and the fly likes Building a better animation infrastructure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Building a better animation infrastructure" Watch "Building a better animation infrastructure" New topic
Author

Building a better animation infrastructure

Kevin Corina
Greenhorn

Joined: Nov 29, 2012
Posts: 14
So I'm working on a really basic "game" just to really test out sprite animation and make a decent, reusable infrastructure.
So basically in GraphicsShell I set up a loopGame that double buffers and renders, and renders then updates.
I set it up to to loop every 30 seconds, in which it calls the draw methods of my background class and player class.
in player, I use to a subclass to load multiple frames into an arrays.

Some animations I would like to be "forced" as the frames cant change until the array finished the animation, (for example, and attack animation would be executed one, and not repeated) while other animations could be changed mid array loop such (such as changing from a left facing run animation to a down facing animation)

GraphicsShell



Player




heres an image.


I feel that my current animation method are inefficient, in your opinion, whats the best way to handle these things?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Building a better animation infrastructure
 
Similar Threads
Why does one if statement work but not another?
constructors and calling methods
Troubles with output
Why does a char value also have an integer value?
sprite sheet animation