top of page

Metal Havoc Release 2: Project Impact

This page is dedicated to the contributions I made for the first release of the game Metal Havoc

Ranged Enemy: Barrel Bot

This ranged enemy tosses an exploding barrel at the player. The barrel will collide with the player dealing damage. The player can shoot the barrel before it collides to prevent taking damage. If the player shoots the barrel, any enemy caught in the explosion radius will take damage.

The implementation of the ranged enemy follows the strategy pattern I mention in Metal Havoc Release 1

 

The barrel follows a arc by using Bézier Curves. This method of creating paths for an object to follow can be useful when wanting to implement flying enemies.

This first video shows the player taking damage when the barrel gets close enough. It also shows the barrel following the red curve presenting on the left screen. That curve can be adjusted based on the positions of the points the designer wishes to set. 

This second video shows the player's ability to shoot the barrel after it is thrown. The player will avoid taking damage if the barrel is shot fast enough.

This third video shows if the player is able to shoot the barrel while the barrel is in range of an enemy, then the enemy will take damage(In this case the enemy will die from the damage).

BarrelCode_edited.jpg

(Click the image to enlarge)

The Barrel script controls the collision that the barrel will potentially have with other objects. 

BezierCurveCode.png

The ProjectileWeapon script inherits from the IDamageable so that the projectiles have health and can take damage.

The GetBezierPoint method takes use of a Cubic Bézier Curves by using nested lerps. This method is known as De Casteljau's Algorithm.

(Click the image to enlarge)

Luke Uritescu

©2022 by Luke Uritescu. Proudly created with Wix.com

bottom of page