Skip to content

Level 2 Basic Enemy Poop

Yash20Sharma edited this page Sep 12, 2022 · 19 revisions

Sprint 2

Level 2 Basic Enemy: Poop

Pre-Design Testing

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.

How the enemy should look like

image

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

What the enemies colour scheme should be

image

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

What the main traits/themes the enemy must portray

image

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

Description

The poop enemies will be the basic enemies of level 2. They will shoot poop sludge at the player.

Final design

Basic design

Walking animation

Attacking animation

Inspiration

Link
poop1
poop2
poop3

User testing

1. Poop Projectile

Description

This enemy will attack by shooting poop projectiles at the player.

Code

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). Function Shoot 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);
        }
    }
Clone this wiki locally