Project Overview

Kung Kong is a pong style game with speed being the focus! Developed in 2 weeks by a team of 5

Game Info

Roles: Game Programmer

Time: 2 Weeks

Date: March 2018 - March 2018

Team Size: 5 (2 programmers)

Genre: Retro - Pong

Engine: Unity

Version Control: Github

Code Language: C#

My Role

I worked on the AI and as support for designers by bug fixing

The AI

The AI for this game did not need to be advanced, it tracks the ball position and try to adjust itself to be at the same position to block it from going past the ai.


void HandleMovement()
{
    //For the ai on the right monitor
    if(transform.position.x > 0)
    {
        //Checks if there is a ball and then if the balls position is on the ai's screen
        if(ball && ball.transform.position.x > 0)
        {
            //Moves the ai upwards
            if(ball.transform.position.y > gameObject.transform.position.y)
            {
                transform.Translate(new Vector3(Time.deltaTime * AISpeed, 0.0f, 0.0f));
            }
            //Moves the ai downwards
            else if (ball.transform.position.y < gameObject.transform.position.y)
            {
                transform.Translate(new Vector3(-Time.deltaTime * AISpeed, 0.0f, 0.0f));
            }
        }
        transform.position = new Vector3(transform.position.x, Mathf.Clamp(transform.position.y, -2.2f, 2.1f), transform.position.z);
    }
}
            

Problems

During this project we did not have the opportunity to sit close to each other but in completely separate rooms. Most of the communication within the team was made through discord with occasional meetups. We also used github for this project and with the communication problems we sometimes ended up with people working on the same parts at the same time, causing more problems that was harder to find.

To solve this we should have been more clear with who was working with what and used a version control which locks item that are currently being changed