-
Notifications
You must be signed in to change notification settings - Fork 3
Animations
polyrain edited this page Aug 1, 2021
·
1 revision
The game engine has a pre-made AnimationRenderComponent
(code) which can be used to show animations on entities. This is a thin wrapper around libGDX's animation system, so it is recommended to read that before using animations.
Animations have to be created in libGDX's atlas format to be compatible with the animation component. You can generate an animation atlas from a series of still images, where each image represents a frame of animation. Some recommended tools that support this:
- libGDX Texture Packer: Official command-line tool.
- Texture Packer GUI Free open-source GUI.
- TexturePacker Alternative tool, some features are payment only.
Add an AnimationRenderComponent
to the entity you want to render, then register each animation that's in the texture atlas. Start and stop an animation with startAnimation()
and stopAnimation()
.
AnimationRenderComponent animator = new AnimationRenderComponent("player.atlas");
Entity player = new Entity().addComponent(animator);
// The animation name must match the name in the atlas
animator.addAnimation("walk", 0.1f);
animator.addAnimation("attack", 0.1f);
animator.addAnimation("jump", 0.1f);
// Now, we can start/stop the animatifon at any time
animator.startAnimation("walk");
animator.startAnimation("jump");
animator.stopAnimation();
Design Document
- Story
- Music
-
Characters
- Main Character
- Bosses
-
Enemies
- Sprint 1: Final Design
-
Sprint 2: Elvish Boss
- Decision to make our boss a mage
- Design Inspiration: Staff Weapon
- Design decisions for boss
- Archery attack animation for minions
- Different types of minion elves and designs
- Melee attack animation
- Boss attack animation using sceptre
- Design Inspiration: Shooting fireballs
- Mage Boss attack method: fireball
- Sprint 3: Walk Animations and Design Amendments
- Sprint 4: Refining animations
- Map Design
- User + Play Testing
- Gameplay
- Art Style Design Guidelines
- Emotional Goals