-
Notifications
You must be signed in to change notification settings - Fork 0
Robot animation functionalities
ShiyanSu edited this page Sep 14, 2021
·
3 revisions
The purpose of robot animation is to simulate the real robot to enhance the visual experience of the game and make the game more playable. In addition, the attack area will be extended when the animation of the robot changed.
-
robot.atlas
This file sets up different animation effects for obstacles. -
ObstacleAnimationController
This class listens to events relevant to the obstacle state and plays the animation when one of the events is triggered. -
ObstacleFactory
Implement the animation effect for robot withincreateRobot()
.
- In
robot.atlas
write the atlas of the animation based on therobot_animation.png
.
robot_animation.png
size: 5418, 2501
format: RGBA8888
filter: Nearest,Nearest
repeat: none
float
rotate: false
xy: 116, 0
size: 834, 1140
orig: 834, 1140
offset: 0, 0
index: 0
float
rotate: false
xy: 116, 0
size: 834, 1140
orig: 834, 1140
offset: 0, 0
index: 0
float
rotate: false
xy: 116, 0
size: 834, 1140
orig: 834, 1140
offset: 0, 0
index: 0
float
rotate: false
xy: 950, 0
size: 834, 1140
orig: 834, 1140
offset: 0, 0
index: 1
float
rotate: false
xy: 1784, 0
size: 834, 1140
orig: 834, 1140
offset: 0, 0
index: 2
float
rotate: false
xy: 2618, 0
size: 834, 1140
orig: 834, 1140
offset: 0, 0
index: 3
...
- Add the animation when creating the robot obstacle.
public static Entity createRobot(Entity target) {
RobotConfig config = configs.robot;
AITaskComponent aiComponent =
new AITaskComponent()
.addTask(new WanderTask(new Vector2(10f, 0f), 0f));
AnimationRenderComponent animator =
new AnimationRenderComponent(
ServiceLocator.getResourceService()
.getAsset("images/robot.atlas", TextureAtlas.class));
animator.addAnimation("float", 0.5f, Animation.PlayMode.LOOP);
Entity robot =
new Entity()
.addComponent(new PhysicsComponent())
.addComponent(new PhysicsMovementComponent())
.addComponent(new ColliderComponent().setLayer(PhysicsLayer.OBSTACLE))
.addComponent(new HitboxComponent().setLayer(PhysicsLayer.NPC))
.addComponent(new TouchAttackComponent(PhysicsLayer.PLAYER, 0f))
.addComponent(aiComponent);
robot.addComponent(new CombatStatsComponent(config.health, config.baseAttack))
.addComponent(animator)
.addComponent(new ObstacleAnimationController());
robot.getComponent(PhysicsComponent.class).setBodyType(BodyType.DynamicBody);
robot.scaleHeight(1f);
return robot;
}
- Player UI
- Popup Menus
- Obstacles
- Boss Enemies
- Progress Tracker
- Checkpoint Design and Functionality
- Score System
- Lives System
- Game Background
- Multiple game-level
- Visual Improvements
- Tutorial Level
- Character Design and Animations
- Character Damage Animations
- Player Animation Functionalities
- Player and Serpent Portal Transition
- Pop-up Menus
- Obstacles
- Lives & Score User Testing
- Buffs & Debuffs
- Buffs & Debuffs redesign
- Obstacle Animation
- Background Design
- Level 2 Background Appearance
- Enemy Monster User Testing
- Level 1 Floor Terrain Testing
- Introduction Screens User Testing
- Character Movement Interviews & User Testing
- Sound user testing
- Level 2 Obstacles and enemy
- Story, Loading, Level 4 and Win Condition Sound Design User Testing
- Giant Bug and Purple Squid animation user testing
- General Gameplay and Tutorial Level User Testing
- Level 4 Terrain User Testing
- Game Outro User Testing