Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Building a better animation infrastructure

 
Kevin Corina
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic