Skip to content

Enemies

SteventheBeven edited this page Jul 2, 2026 · 13 revisions

System Summary

Different types of enemies

There are three different types of enemies that are children of the BaseEnemyClass, EnemyPatrol, EnemyFly, and EnemyShooting. These three enemies pose threat to the player and should be avoided or stomped on during gameplay.


Connected Systems

Connecting Systems:

Subsystems:


Bugs

List of known bugs. Be descriptive but keep it brief!

  • None

Feature List / Breakdown of Features

Base Enemy:

  • When landed on, the player defeats them and gets a bounce, larger if they're holding jump.
  • When run into from another direction, the player takes damage.
  • All enemy types have properties that can be adjusted.

Patrolling Enemy:

  • Property Ground Speed: Controls how fast the enemy moves on the ground.
  • Property Restricted: Controls if the enemy turns or falls when it would pass over an empty tile.

Shooting Enemy:

  • Property Direction: Controls the direction that the enemy is shooting.
  • Property Fire Rate: Controls how fast the enemy fires.
  • Property Shot Speed: Controls the speed of the projectiles the enemy fires.
  • Projectile Bounce: Toggle for allowing the player to jump on projectiles.
  • Gravity: Toggle for giving the shooting enemy gravity

Flying Enemy:

  • Property Flying Speed: Controls the speed the enemy is flying at.
  • Property Endpoint: Sets the second point the enemy will fly to and from.

Stationary Enemy:

  • Property Gravity: Controls if the enemy has gravity applied or if it hovers.

Animations:

  • All enemies are animated, each with different animations.
  • Every enemy has a death animation.
  • Stationary enemy has an idle animation.
  • Patrolling enemy has a walking animation.
  • Shooting enemy has an idle and a shoot animation.
  • Flying enemy has a flying animation.

Important Variables

PropertyFile: Resource = The property file that the enemy is drawing it's properties from..

animatedSprites : AnimatedSprite2D = The animated sprite component of the enemy for transitioning between animations.

Important Functions

  • func assign_script(id: String, position: Vector2i) -> void: Assigns the script of the given ID (located in the Resources/Enemies folder) to an enemy at the given position.

  • func apply_script(file: Resource) -> void: Applies the effects of the given properties in the file to the enemy, this function is used by finding the enemy at the location specified in the script.

  • func apply_gravity(delta: float) -> void: Applies the gravitational forces to the enemies.

  • func check_out_of_bounds() -> bool: Checks if the enemy is outside of the bounds of the level.


Future Work / Risks

Future Work:

  1. Give the patrolling enemy smoother movement down slopes

Risks:

  • None

Miscellaneous Notes

  • No Notes

Clone this wiki locally