particlequest / ParticleQuest

Fork of Mozilla BrowserQuest for telling a fantasy story about particle physics at CERN.
http://particlequest.com
Other
29 stars 8 forks source link

Document Animation System #17

Open L4D15 opened 11 years ago

L4D15 commented 11 years ago

Add information on how the animations are performed in the game so we can create new ones more easily.

L4D15 commented 11 years ago

Animation information for each element are defined in ./client/sprites. Seems like the animations are defined like

"animation":{    // Name of the action performed (walk, attack...)
    "length": 0   // Number of animation frames
    "row": 0      //Row corresponding to the animation on the image
}

The images can be found in client/img but we need to find where the objets in ./client/sprites are linked with an specific image in ./client/img.

L4D15 commented 11 years ago

It seems like the sprite is asigned automatically using the kind of entity given when the entity is created. It uses the image stored in ./client/img depending on the resolution (1 = low, 2 = mid, 3 = high).

The type of posible Entities are defined in Types.Entity.

The available sprite names are initialized in the init function of the Game class ./clien/js/Game.js.