-
Notifications
You must be signed in to change notification settings - Fork 0
Checkpoint Design and Functionality
The checkpoint was decided to be a rover, keeping in line with the space theme, but there are also Viking longship elements like the curving of the main body of the rover and the flag with a rune symbol on it. The coloring and style is all adhering to the minimalist 2D style we're going for.
Rough attempt on Illustrator to create a generic rover
Edited to add more viking imagery, resembling a longship by the shape and a flag with a rune on it
The checkpoint was designed to be easily implemented into future levels as its very modular and really only relies on the levels that the checkpoints will be on and the pop up menus. The main checkpoint was generated as an obstacle entity under the function createCheckpoint
public static Entity createCheckpoint(Entity target, ForestGameArea area) { Entity checkpoint = new Entity() .addComponent(new PhysicsComponent()) .addComponent(new PhysicsMovementComponent()) .addComponent(new ColliderComponent().setLayer(PhysicsLayer.NONE)) .addComponent(new HitboxComponent().setLayer(PhysicsLayer.NPC)) .addComponent(new CheckPointComponent(PhysicsLayer.PLAYER, area)) .addComponent(new TextureRenderComponent("images/untouchedCheckpoint.png"));
PhysicsUtils.setScaledCollider(checkpoint, 0.9f, 0.4f);
return checkpoint;
}
This function is in charge of creating the simple obstacle that the checkpoint will be appear like and its physical elements such as its hit box and colliusion layer. CheckPointComponent is a class component that is in charge of the logic of the checkpoint and will keep track of if the player collides with the checkpoint and then alert the game that this has occurred. This is the on collision logic of the CheckPointComponent that the checkpoint will use.
private void onCollisionStart(Fixture me, Fixture other) { if (hitboxComponent.getFixture() != me) { // Not triggered by hitbox, ignore return; }
if (!PhysicsLayer.contains(targetLayer, other.getFilterData().categoryBits)) {
// Doesn't match our target layer, ignore
return;
}
// Try to attack target.
Entity target = ((BodyUserData) other.getBody().getUserData()).entity;
CombatStatsComponent targetStats = target.getComponent(CombatStatsComponent.class);
if (targetStats != null) {
area.setCheckPointStatus(1);
}
}
This simple function will be in the areas that the checkpoints will be loaded into e.g. ForestGameArea simply replace the grid coordinates with the location the checkpoint will be spawned.
private void createCheckpoint() { GridPoint2 checkPoint = new GridPoint2(20, 10); Entity checkpoint = ObstacleFactory.createCheckpoint(player, this); spawnEntityAt(checkpoint, checkPoint, true, false); }
A check was added into the Popups such that it will do a simple check before reloading the main game to see if they will either spawn at the check point or at the start of the map. This check will only last as the player is with in the specific area. For example the memory of the player passing the check point is lost once they return to the main menu. Code for the pop ups such as the pause pup have been edited to all for this checkpoint mechanic such as the onReplay() this contains the logic:
public void onReplay() {
if (area.getCheckPointStatus() == 1) {
game.setScreen(GdxGame.ScreenType.CHECKPOINT);
} else {
game.setScreen(GdxGame.ScreenType.MAIN_GAME);
}
}
The constructors also can now accept a parameter for the checkpoint being the ForestGameArea. This was designed like this as only one map is present but can be easily modified to accept different GameAreas. The onReplay() was also designed for the potential of multiple checkpoints but currently only works for one checkpoint.
- 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