Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animation architecture pattern

I'm writing a game project as a hobby, and am looking for some architecural advice about how best to organize my game objects and their various animations.

For example, I have a class called Wizard, and a class called Dragon. A Wizard has, at least, 10 different specific animations associated with it, depending on its state, and the same for Dragon.

So my question is this: is there a standard pattern for organizing these sorts of objects so that it is efficient and easy to extend (i.e. it should be easy to add new animations and new objects)?

I have various ideas about how to move forward on this, but I don't want to get this wrong since it is such an important part of the game architecture. It seems easy to get this working for a small game, but I am afraid of unmanageable complexity as it gets bigger.

like image 388
Robert Evans Avatar asked Jul 24 '10 01:07

Robert Evans


People also ask

How is animation used in architecture?

Unlike 2D architectural drawing, architecture animation helps clients view a particular section of their physical structure more clearly from different angles through the visual presentations of whole building including landscape projects, exteriors and interiors.

What are the 4 basic types of architecture?

Architectural form is derived from 4 basic elements that are further elaborated until they begin to take form and serve as reference points for the three-dimensional spaces that we inhabit. The 4 primary elements of architecture include the point, line, plane, and volume.

What is architectural animation technology?

In the Architectural Animation Technology program, you'll learn to communicate spatial ideas and basic construction visualization techniques to a variety of industries, including architecture, interior design and digital environments.


1 Answers

I suggest having an interface such as "Character", which defines what all of these entities should be able to do. Then your Dragon and Wizard classes are just implementations.

Another route is to have a Base class from which you extend from and use this to control the "hierarchical sprawl" associated with large projects, by drawing out a hierarchy of your objects and identifying extended base classes.

like image 135
kobrien Avatar answered Sep 17 '22 17:09

kobrien