While I was looking into some of the things required to complete my assigned project I began to realize how much there was that I would need to look into researching. Some very small things that I thought I already knew but had forgotten.
The first problem that I ran into was creating a movement script that would accommodate for the style of movement that I wanted inside my game. I wanted the player character to only be able to move in a total of 8 different directions like the original Berzerk game. To create this I would have modify one of my previous move scripts that I had created before and change it to better suit what I wanted. The code that was used for the basic move function was:
//Movememt: Left and Right
playerPosition.x = playerPosition.x – moveSpeed * Time.deltaTime;
else if (Input.GetKey(“d”))
playerPosition.x = playerPosition.x + moveSpeed * Time.deltaTime;
//Movement: Up and Down
playerPosition.y = playerPosition.y – moveSpeed * Time.deltaTime;
else if (Input.GetKey(“w”))
playerPosition.y = playerPosition.y + moveSpeed * Time.deltaTime;
myTransform was a Transform declared in the start function as this.transform. playerPosition was a Vector3.
At the start of every update the playerPosition would be set to myTransform.position (playerPosition = myTransform.position;) movement would run and then myTransform.position is set to whatever the current playerPosition is (myTransform.position = playerPosition;)
This simple function allowed me to create the desired functional movement that I was looking for. I was able to move the character in what looked like 8 different directions when you held in the required buttons to do so.
A big thing that I had never really looked into before was the animations that you can use in Unity. I needed to be able to make a player animation for Idle, left and right movement. To do this I needed to create the necessary sprites for the animations themselves. I used the website piskelapp.com to help me with this. With the help of this website I was able to come up with many different sprites that I would use for my game. Unfortunately I didn’t get to use them in the game that was handed in but hopefully I can use them in the future.
Even though I didn’t complete many of these animations, I still managed to create animations of my Idle and both left and right walking states. These animations were not implemented into the game and didn’t function with the player movement as planned. All I managed to do was create animations which I thought was a really fun thing to do and a really useful skill to know.
When looking at the audio requirements that I thought I might need, I figured that I really didn’t need many so I took to the internet to source out some free audio files. The few clips that I found came from the SoundBible which was easy and quick to use. After getting the music files that I wanted, I found that I was not happy with some of the audio and it’s length in relation to how long I wanted certain sounds to play. This is when I took to Audacity to try and solve this problem.
There really wasn’t much to it once I got into it. I had never looked into chopping audio before so it took a little bit of trial and error before I was confident enough to say that I knew what I was doing. Taking a clip and cutting off unneeded or excess audio is now a very clear process to me.
Even though the project over all was a flop, I still managed to gain new skills from completing the little that I did and I am more than happy with that.