Dev Blog Week 1 – Top Down Shooter

The first week of GAM111 had us working a six-hour sprint to creating a quick top down shooter for a game jam. There were multiple ways to approach this problem and the first step was to figure out which game engine to create the game on. I considered creating the game on Unreal Engine 4 because I had previously gotten through half of the top down shooter tutorial available on the Unreal Engine website but later decided that I wanted to increase my proficiency in Unity as most of the projects at university will be using unity.

Capture.PNG

I thought about creating the game as a 2D top down shooter but decided to create the game in 3D because of my previous experience. I followed a simple video tutorial to create the top down shooter and used a simple concept with cubes and cylinders due to my limited ability to create models and materials. I was also extremely pressed on time this week due to it being the first week back at uni and trying to integrate work and uni life, it was the best decision to have a simple game with simple assets.

There were a number of concepts that I was tackling for the first time when creating this game, having the enemies move towards the player and having the player look towards the mouse location. The mouse location was being translated across correctly, however, I had difficulty with the concept of Quaternions that I didn’t quite manage to get the player to face directly towards the mouse location, the player however still turns when the mouse moves but 90 degrees away from where it is supposed to be looking. This problem took a fair chunk of time from my 6 hours and I felt that perhaps I should have chosen a different solution or moved onto the next problem and probably would have gotten more work done on this game. However I did manage to get the enemies moving towards the player, due to the extended time getting the previous concept to a semi-working state I only managed to get the enemies moving towards the player, there weren’t any attacking or damaging actions. So I decided to use this to instead to shape the game around it so that the player shoots blocks which push the enemies back instead of killing them.

[code language=”csharp”]

float x = Input.GetAxis("Horizontal");
float y = Input.GetAxis("Vertical");

transform.Translate(x * Time.deltaTime * speed, 0, y * Time.deltaTime * speed, Space.World);

Vector3 mousePos = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 50);
Vector3 lookPos = Camera.main.ScreenToWorldPoint(mousePos);
lookPos = lookPos – transform.position;
float angle = Mathf.Atan2(lookPos.z, lookPos.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.AngleAxis(angle, Vector3.down);

[/code]

In conclusion, I think I could have managed my time better this week and try to identify when a problem isn’t working out and to try another solution. However, I was quite happy with how I adjusted my game to a certain theme due to the limited time I had. Overall there were some positive outcomes but definitely, need to work on my time management.

 

Leave a Reply

Your email address will not be published. Required fields are marked *