Junior Tech Game Designer
Junior Tech Game Designer
Tails, who decided to be alone for a time, notice that Eggman’s robots
are invading the Mystic Ruins. He decides to stop them using his genius
and his constructions. Unfortunately, a robot ended up breaking his
tails, depriving him of his ability to fly
Program 3C and features, create and implement VFX.
Patrol is compatible with Melee and Ranged enemies. A list of empty objects containing path points script is set in the enemy script (in the editor). An index is set to 0 at the start of the game and first path point of the list is set as the current path point. First, the AI is rotated in the direction of the current path point, then each frame the distance between enemies and path point is calculated and as long as it is greater than 0 a forward velocity is added to enemy rigibody. When this value is equal to 0, velocity is removed and a variable « path point time« , contained in the path point, is taken. A timer is started and when « path point time » is reached, the next path point is taken and behaviour is repeated
Each constructions must be unlocked by taking collectibles. When input is pressed, the cost of the construction is checked and if it is equal or less than scraps number, a small force is added to the player in up vector direction and current selected platform is instantiated at the player position.
For the bumper, when a player enters in bumper trigger a force is added in the vector up direction for a while.
Scrap attack must be unlocked by picking a collectible on the map. When input is pressed, a projectile is launched with a force set in the editor. Each frame a line is drawn from the projectile in the direction of the ground, if the line hits the ground, the explosion trigger is activated and all enemies present take damage.
When the player character enters into enemy’s field of view, patrol behavior is stopped and « SeePlayer » behavior is started : Each frame enemy is rotated in the direction of the player. The distance with player is checked and while it is greater than 0, a forward velocity is added to reach the player. When the player is reached, a timer is started and when it expires an animation is played, if the player character enters in enemy collider, health points are removed. Damages taken, can be set in the editor).
The only difference with melee enemy is Distance enemy doesn’t move, a delay can be set in the editor and each time this delay is reached, a projectile is instantiated.
Each frame a forward velocity is added to the projectile, if the projectile enters in player collider, health points are removed (damages taken can be set in the editor).
Stun is compatible with melee and distance enemies. A trigger is placed over the enemy. Another trigger is placed at the below the player. When player is in the air if player is falling and the two triggers collide, enemy behavior is stopped for a while and once delay is reached « SeePlayer » state is reactivated.
For this project I made a document to explain my development patterns and how my code works :
I took the example of enemies, melee and distance enemies share different properties, they have 2 general states : « Patrol » and « See Player« .
In patrol state enemies can follow a path or stand still, if player enters their field of view, state changes
Melee enemies reach the player position and each delay they attack player and damage him
Distance enemies stay in place and each delay they instantiate a projectile and when this projectile hits the player, he takes damage
To see more features explained, you can download the full document
(+33)7.68.26.54.84.
tristanbonnetpro@gmail.com