-
Notifications
You must be signed in to change notification settings - Fork 1
Level 2 Basic Enemy Poop
Before designing the Level 2 enemy we conducted surveys within our studio group to understand what potential users of the game believe the boss should look like. This information was required to ensure the villain's team, studio group and story team ideas could be collated so that we can derive relevant insights and create the best possible enemy for this game.
From the insights provided above, we can derive that the level 2 enemy needs to portray these characteristics:
- Slimy features - to look disgusting and creepy
- Dirty - so that the character player wants to run away
- Poop structure - to display the dirty theme that is associated with the level 2 enemy
From the insights provided above, we can derive that the level 2 enemy needs to portray a colour scheme which displays these characteristics:
- Dark Green - to show the slimy feeling and texture associated with this enemy
- Brown - to represent a dirty & disgusting persona
- Poo colours - to represent a mixture of a colour scheme from dark green to light brown to display a slimy poo-like enemy
From the insights provided above, we can derive that the level 2 enemy needs to portray these specific themes :
- Disgusting - so that the main character wants to run away
- Dirty - so that it represents the poo structure
- Creepy - This is the main feature which differentiates the level 2 enemy from the other enemies as they are based in physical power and dominance whereas the level 2 enemy is more psychological based in creepiness and disgust
The poop enemies will be the basic enemies of level 2. They will shoot poop sludge at the player.
This enemy will attack by shooting poop projectiles at the player.
Projectile functionality is one of the most important parts when implementing a ranged enemy. Unlike melee enemies, ranged enemies need to perform multiple tasks to achieve the shooting required. Hence, we have implemented the ProjectileFactory.java
, ProjectileTask.java
, and ShootTask.java
.
-
ProjectileFactory.java
is created to implement the basic component of the projectile within the game in general. It has been simplified so that it could be used for both enemies and players. -
ProjectileTask.java
is created to control the behavior of the enemies (possibly players in the future but need some modification) before performing a shoot (for example the player has to be visible and in range of the shooting area). FunctionShoot
in this class is used to perform the shoot and wait task and is also used from the start() or update(). This is to give a pause between the shooting of the enemies (like a reload). This can also be exploited to adjust the level intensity (a higher level will have a lower wait time between 2 shots). -
ShootTask.java
is used to control the behavior of the projectile while it is being shot out. For enemies, it is implemented to chase after the player because this could be one of the features of the game and require players to have more skill to dodge and/or parry the projectile. However, there is a bug associated with the projectile (it cannot be disposed of when hit the target and/or any obstacles).
public void shoot(String projectileType) {
if (projectileType == "poopSludge") {
projectile = createPoopsSludge(target);
}
if (projectileType == "discus") {
projectile = createDiscus(target);
}
if (projectile != null) {
ServiceLocator.getEntityService().register(projectile);
projectile.setPosition(owner.getEntity().getPosition().x, owner.getEntity().getPosition().y);
float xVel = owner.getEntity().getPosition().x - target.getCenterPosition().x;
float yVel = owner.getEntity().getPosition().y - target.getCenterPosition().y;
// SHOOOOOOOOOOOOOTTTTTT;
projectile.getComponent(PhysicsComponent.class).getBody().setLinearVelocity(xVel, yVel);
setTask(taskWait);
}
}