Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What classes should I build for 2D game animations? Any suggestions?

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
I want to make a 2D game and know the basics of using directX. However, I have some questions about the class structure I shoudl use.

I was thinking of creating the following:

-a class 'Animation' which loads the .tga file for an animation into a texture,
the position, size, and handles drawing the animation.
-a class which contains something like an array of type 'Animation' for a
character (ie, left, right, jump, etc).
-collisions would be handled by both classes (if a character were to interact
with a single animation for example)

I'm sure someone has thought about this problem before and maybe there is a better way to handle animations for 2d games.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top