-
Notifications
You must be signed in to change notification settings - Fork 1
Map contents
Our design of map contents consists of props, obstacles and food. These content will generate some positive linkages with the player interaction system and the player health system, and enhance the fun and gameplay of the game. This wiki will introduce these contents based on the created illustrations. We then made all the entities we created to appear on the map in random places.
Each contents exists independently. In order to limit their particularity, their assigned attributes are different. In the map generation, we set the number of obstacles and items to be equal.
Basically, we used the following templates to generate rigid bodies, and then gave them different other functions. We generated in the following path:
source/core/src/main/com/deco2800/game/entities/factories/ObstacleFactory.java
public static Entity createRunesGate() {
Entity RunesGate =
new Entity(Entity.Type.OBSTACLE)
.addComponent(new TextureRenderComponent("images/RunesGate.gif"))
.addComponent(new PhysicsComponent())
.addComponent(new ColliderComponent().setLayer(PhysicsLayer.OBSTACLE))
.addComponent(new HitboxComponent().setLayer(PhysicsLayer.OBSTACLE))
.addComponent(new CombatStatsComponent(100, 0));
RunesGate.getComponent(PhysicsComponent.class).setBodyType(BodyType.StaticBody);
RunesGate.getComponent(TextureRenderComponent.class).scaleEntity();
// car.scaleHeight(2.5f);
PhysicsUtils.setScaledCollider(RunesGate, 0.5f, 0.2f);
return RunesGate;
}
...
Obstacles are currently divided into damaged vehicles and snake-shaped monsters. Among them, the damaged vehicle is a destructible obstacle. Once the player collides with them during the operation, the player will lose health.
- fire will damage player with 1 heart.
- _Knocking stones will damage player with 1 hearts.
- ThunderCloud will damage player 1 heart.
The item takes the first aid kit as an example. Once the player picks it up, it will give the player some health restoration. The first aid kit is randomly generated during the map generation, so it is also related to the map generation.
- Food will heal player one heart.
- That's the idea from rune "ᛉ"(algiz), which means protection. It will increase the player's 1 heart also.
- first aid kit will heal player full health(3 hearts).
Collectable is a newly added map content. Currently, through inspiration from temple run, two types of content, coin and diamond, have been added. They will be used as the achievements of the player during the game, and will be permanently stored as a variable.
In the process of designing collectables, I tried to highlight their presence through animations floating up and down, and to increase the player's desire to pick them up.
- Picking up a coin will add one to a player's collectable count._
- Picking up a diamond will also add one to a player's collectable count._