top of page

Attack of the Killer Chicken

Game Engine: Unity 5

Platform: PC

Scripting Language: UnityScript

Attack of the Killer Chicken is a 3D tower defense game set in a hypothetical scenario where the chickens become strong and try to overpower the player in an industrial environment.

 

Player will play through different levels and understanding of multiple towers and enemy types to employ the best strategies to fight those killer chickens.

 

 

 

Scope of Work: 

  • Programming the waypoint system which guides the enemies' movement.

  • Programming a single tower script to be used with multiple towers, by changing the variables and the boost function.

  • Programming a single enemy script for use for multiple enemies.

  • Programming the wave system to spawn different enemy types on different levels and rounds.

  • Programming the projectiles shooting from the towers and the enemies, together with the respective effects.

  • Programming the upgrades functionality and selection of the towers.

  • Programming the UI of the game scene using GUI for the non-moving UIs and the new UI for the upgrade buttons which follows which tower has been pressed.

  • Appropriate variables are made public in the inspector for testing.

  • Programming of tutorials of the game.

  • Programming the animation of the conveyor belt.

  • Programming the sound and special effects to play. 

  • Programming of the button functions such as selling, sound control, fast forward, pause etc.

  • Setting up the animator and making prefabs of the chickens and towers.

  • Setting up the UI for the win and lose scenes which are overlays.

Mechanics

Mechanics

Boost System:

Players can spend a small amount of money to boost any tower to get a small perk from the tower such as multi-shots. The boost is timed and thus, suitable to help players in dire situations.

Different types of enemy and towers:

Players will need to consider which enemy type is stronger and what are their weakness and thus, have better strategy against them. 

Health:

The health of the player is also linked  to the towers' health. The enemies can damage the towers and when destroyed, it also reduces the health of the player. 

Special Pathways:

There are some special pathways in the map which only allows a certain type of enemy to pass which shortens the distance they travel thus, becoming more dangerous if no defenses are employed.

 

 

 

In-game screens:

Programming

Programming
Pseudo code for waypoint system
Waypoint game objects are placed at each intersection, each with a waypoint script attached.
//In the waypoint script, it contains variables such as the next waypoint a single game object, whether it is split path a boolean and an array of split paths or a specific enemy type split path also uses the same array and an enemy type to specify which enemy type will move to which path.
//In each enemy's script, using Unity's built-in function on trigger enter, once it collides with the waypoint it is moving towards, it will acquire information from the waypoint script in order to go to find the next waypoint.
 
//First, it checks whether there is a split in the lanes and checks if there is a split that has a specific enemy type. If both conditions are true,
              //Check if the current enemy type is the enemy type specified in the waypoint script, if it is, go to the last waypoint in the array
              //or else alternate between the first 2 waypoints (or more if there is) in the array so that they split evenly.
//Next, it checks if it is only a split path, if it is, alternate between the waypoints in the array
//Follow by checking if it is only split to a specific enemy split path. 
//Finally, if it is a normal waypoint link, it will go to the next waypoint. 
 
 

You can download the game here. (Note : This is a google share link. Please log in onto google account.)

Pseudo code for Shooting
In tower script, it contains variables such as damage, effects such as slow and damage over time, boost cost, and the boost effects. When the tower shoots, the effects are then passed on to the projectile which is then passed on to the enemy. 
 
In the enemy script, for each projectile hitting it, it reduces it health through a health bar script, adds in the effects of the projectile to its local variable. The effects are then applied with a timer to slow their movement or reduce health. 
                                                            
                                                                                                                              using the timer, other instances of damage is then applied or                                                                                                                                   the slow is then removed.
 

© 2023 by Ee Xuan En, Arvin 

bottom of page