Skip to content

Projectiles

ElanagaiArivuchelvan edited this page Oct 17, 2023 · 4 revisions

Projectile effects in this game will include a variety of visual, aural, and practical components that enhance the entire gaming experience. These effects seek to replicate the chaos and ferocity of combat while giving players constructive criticism and boosting immersion in the game. Projectiles in the game are intended for both the Engineers and the mobs in the game area each defined with respective target layers.

The base Projectile

  • The createBaseProjectile method in the 'ProjectileFactory' class is responsible for creating a basic projectile entity that serves as a template for other projectile types in the game. It's a generic method for creating projectiles with common characteristics.

Screenshot (312)


  • UML depicting the Relation/Hierarchy of the Components

image

Creating projectiles

  1. The method spawnProjectile in 'ForestGameArea' class can be used to spawn projectiles that will be directed towards the specified target layer

Position - Position of the attacking Entity
Target layer - The enemy layer of the attacking entity
Direction - Of which the projectile should be animated (Towards Mob or Towards Engineers)
Speed - Respective speed of the projectile

image

  1. The method spawnMultiProjectile in 'ForestGameArea' class can be used create several projectiles having similar properties but different destinations.

Position - The position of the Entity that's shooting the projectile. Target Layer - The enemy layer of the "shooter". Direction - The direction the projectile should head towards. Space - The space between the projectiles' destination. Speed - The speed of the projectiles. Quantity - The amount of projectiles to spawn.

image

  1. The method spawnEffectProjectile in "ForestGameArea' returns the type of projectile which has AOE damage.

image

Interaction between classes when creating a projectile and animating it

Instance taken for depicting the fireball projectile interaction image

Projectiles Used for attack elements in the game

Fireball : image
Stun Effect : image
Snow ball Effect : image
Mob Xeno attack : image
Mob King attack : image
Pierce : image
Ricochet : image
Fireworks : image
Archer : image

Clone this wiki locally