-
Notifications
You must be signed in to change notification settings - Fork 0
Asteroid fire animation functionalities
raneechu edited this page Oct 2, 2021
·
6 revisions
The purpose of asteroid fire animation is to simulate the real fire to enhance the visual experience of the game and make the game more playable.
-
asteroidFire.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 asteroid fire withincreateAsteroidAnimatedFire()
.
- In
asteroidFire.atlas
write the atlas of the animation based on theasteroid_animation_3.png
.
asteroid_animation_3.png
size: 2440, 2076
format: RGBA8888
filter: Nearest,Nearest
repeat: none
float
rotate: false
xy: 0, 0
size: 400, 630
orig: 400, 630
offset: 0, 0
index: 0
float
rotate: false
xy: 400, 0
size: 400, 630
orig: 400, 630
offset: 0, 0
index: 1
float
rotate: false
xy: 800, 0
size: 400, 630
orig: 400, 630
offset: 0, 0
index: 2
- Add the animation when creating the asteroid fire obstacle.
public static Entity createAsteroidAnimatedFire(Entity target) {
AsteroidFireConfig config = configs.asteroidFire;
AITaskComponent aiComponent =
new AITaskComponent()
.addTask(new WanderTask(new Vector2(0f, 0f), 0f));
AnimationRenderComponent animator =
new AnimationRenderComponent(
ServiceLocator.getResourceService()
.getAsset("images/asteroidFire.atlas", TextureAtlas.class));
animator.addAnimation("float", 0.2f, Animation.PlayMode.LOOP);
Entity asteroidFire =
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);
asteroidFire.addComponent(new CombatStatsComponent(config.health, config.baseAttack))
.addComponent(animator)
.addComponent(new ObstacleAnimationController());
asteroidFire.getComponent(PhysicsComponent.class).setBodyType(BodyType.DynamicBody);
asteroidFire.scaleHeight(1f);
// Make hit box smaller
asteroidFire.getComponent(HitboxComponent.class).setAsBox(new Vector2(0.3f, 1f));
// Allows player to pass through fire while taking damage
asteroidFire.getComponent(ColliderComponent.class).setSensor(true);
return asteroidFire;
}
- 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