KYLE THOMAS
Game Programmer | Contact: kyle.j.t@live.co.uk

GRAPPLE


GIF of player attacking enemy
Team Name: Northern Jam
Team Size: 4
My Role: Programmer
Tools: Unity
Language: C#
Time Taken: 2 days
Jam: BaconGameJam 10
Theme: One Weapon - Many Uses




Game Overview

Grapple was a game made for BaconGameJam 10, with the theme "One Weapon - Many Uses". As a team, we decided that our weapon should be a grapple as you can pull, hook shot to damge enemies and hook shot you to parts of the map. Our levels were carefully designed so that you can stealth around each enemy undetected whilst still being a challenge towards the player.

My Role

  • Artificial Intelligence
    • My main role in the game was to handle the Artificial Intelligence. This was an interesting experience because I havent touched on 3D AI as much so it was a big learning experience for me. The AI system that I worked on handles roaming of the enemy, this includes node positions in which the developer can put in for the enemy walk path. Aswell as this, a spot and chase system was added. If a player is in sight, the enemy will chase down the player and attack unless the player is out of sight or until the enemy is killed by the player. This could be improved far more as currently, it is really easy to lose the enemy.

What went well?

  • Strong team communication
    • Throughout the project, we maintained a very strong team communication at all times. This made development easy as we were able to know what everyone was working on and we were able to assist with any errors that other team members might be having.
  • Project management skills
    • During development we used Trello which allowed our team to manage the project. We assigned names onto cards on Trello which allowed us to work on specific parts of the game and when the task was done, we moved it into the finished section.
  • Meeting the deadline
    • We made the game for BaconGameJam 10 which we were only given 48hrs to finish. Because we had great team communication and project management skills, we were able to complete the game in time, bug check and make a build for it.


What can be improved?

  • Artificial Intelligence
    • The biggest thing that could be improved for future would be the AI. I feel that it was too simple for the game that we designed as the only way the enemy could see you was through cone of vision. In future to improve this, I could make the player have a sound radius so that the enemy can essentially hear the player and run to that location, causing the game to be harder.
  • Source Control
    • During development, some team members were unsure on source control, resulting in code errors and scenes breaking. In order to improve this in future, we could possibly commit at seperate times and possilby get to know source control before making a commit.
  • Improved Levels
    • I feel that the levels in the game were too basic and didn't offer any challenge. To improve this we can add more strategic routes for the player to overcome and add more levels so it doesnt end as fast.
  • Improved User Interface
    • The user interface was very basic and only showed player and enemy health. In order to improve this, we could add a menu, pause screen, options screen and a help menu.
  • Audio
    • Audio wasn't used in the game due to the fact time was running out at this point and we hadn't bug tested. In order to improve this we could meet the deadline much quicker in order to find some music and sound effect for the game.

CODE SAMPLE


Enemy Roam:

A code sample taken from the enemy script that deals with chosing the path of where the enemy should go using a list of positions.
public void Roam()
{
		Vector3 position = transform.position;
	
        if (roamPositions != null && roamPositions.Count > 1)
        {
        		Vector3 destination = roamPositions[roamPositionIndex];
        	
                if (destination != position && currentPosition != destination)
               	{ 
                		agent.SetDestination(destination);
                        currentPosition = destination;
                        isAtPosition = false;
                }
                else if (position == destination && !isAtPosition)
                {
                 		isAtPosition = true;
                        //random timer on wait
                        StartCoroutine(Wait(Random.Range(2.0f, 4.0f)));
                }
                else if (destination != position && !isAtPosition)
                {
                       	//if chased and no longer chasing - return back to normal path
                        agent.SetDestination(destination);
                        currentPosition = destination;
                        isAtPosition = false;
                }
       	}
        else if(position != startPosition)
        {
        		agent.SetDestination(startPosition);
        }
}
		

Enemy Chase:

A code sample taken from the enemy script that deals with the enemy chasing the player. When the player is in the view cone, the enemy will set its new destination to the players position within the world. The rotation function is there to stop the enemy from losing the player so easy.
void RotateToPlayer()
{
		//allows enemy to quickly rotate
    	this.transform.LookAt(new Vector3(player_controller.transform.position.x, transform.position.y, player_controller.transform.position.z));
}
 
public void Chase()
{
		RotateToPlayer();
    	Vector3 playerPosition = (player_controller.transform.position);
    	agent.speed = 4.0f;
    	agent.SetDestination(playerPosition);
}