Construct a workable game
Assignment 3
SHINDY LEONG
SHINDY LEONG
For the assessment 3 we will be in a group of 4, I'm teamed up with Carly, Joe and Gaddafi. When planning the genre, art style etc we wanted to find something that would be suitable for everyone, especially the art style. The idea for our game will be a 2D platform shooter game with fungus scenes, the reason we decided to go for this platform is because we found tutorials and templates on Assets Store in Unity and other websites. Since none of us have any experience with coding it would be safer to have a guide and template to follow. Each group member have a different art style, to balance it out we chose the genre science fiction in pixel art. It might be difficult to make the assets look similar, but we will sort it out as there probably will be tiny adjustments.
The main character and NPC are on their way to another location where engine issues suddenly appear on the spaceship. The guardians are forced to land on an unknown planet, when they exit the ship the environment is very colourful and energetic. The NPC continues to repair the engine problems while the main character explores the unknown planet. As the time goes by aliens begin to attack the them middle of nowhere, the main character fights the aliens while the other guardians try to repair the damage. The character will face enemies from different waves and have boss battles. When the boss is defeated NPC has repaired the ship and will leave the planet, unluckily the ship crashes to another planet.
During our discussion we mentioned different games to get an initial idea of the environment, fungus and art style. I looked at the Celeste, Destiny 1, Destiny 2 and other games for the art style. When looking at the images the environment will consist of bright hues, but we will have another colour palette rather than the ones on the reference images. I like the idea having it in pixels, probably 8-bit as it will be suitable for everyone to make. Although I like the combination of bright colours and pixels, it is simple but will look very beautiful with the hues.
The beginning of our game there will be a fungus part, we mentioned Celeste as it has a clear image box of the character rather the pixels. For the art style we decided to go for something similar like Celeste and the fungus part with the image section. The atmosphere will be quite colourful and energetic in a sort of jungle ancient ruin environment (top right image) but more sci-fi/fantasy looking.
I looked at a basic tutorial on How to make a 2D Game in Unity by Brackeys [1] and something I came across were sprite based and tile based. I tried out the tile based version, this method is a lot easier than the sprite based as it allows you to build on a grid. Since we are a group of 4 we thought it would be better to go for the sprite based to give us more control and place the objects freely. Although, I would use the tile based if I wanted to make a game with several levels to build the levels faster.
Everyone got an individual weekly task on how to set up unity with the coding etc. I looked at tutorials of health Bars and looped levels, the looped level can be found in Flappy Bird as from assignment 1. The Health Bars is for the main character, enemies and the ship. I followed the tutorial by Alexander Zotov - How to create a simple UI health bar for a character in Unity game [2]. I managed to get it work, it was fairly easy with only three scripts needed health Bar, enemy and move script. However, I will try to add these scripts to our original Unity project next time and hope it works.
I didn't do the loop level, so Joe got it sorted out instead as I took care of the UI. The team took care of the controllers, shooting controllers, fungus cutscene etc.
For this week I worked on the UI and pause menu, I followed the two tutorials below. For the start menu I added play game button, scoreboard button, options button and quit button. I managed to get the all the buttons work besides the scoreboard that wasn't included in the tutorials and options settings. So, I will take a deeper look into it later. Afterwards I created a simple pause script following the tutorial on the right. The following I have to sort out is the scoreboard, option settings and a respawn when the player dies.
Below are the main menu and pause menu, the main menu are in a separate scene (Menu scene). To connect the main menu and main game together I had to import both scenes into the build settings which connects the scenes. There were only two scripts needed, a main menu script and pause menu script. Everything else was set up in Unity by UI buttons, slider and text. The game level layout is setup by Carly as there are free assets downloaded from other websites and a couple of sprites/particle systems Joe has created.
The Pause Menu is fairly simple that has 3 buttons, the resume will go back to the game, menu will take you to the Main Menu as shown below and quit will close down the window.
This is an overview of the Main Menu so far, I managed to get the Play Game-, Options- and Quit button to work. I have to create a scoreboard and add other options. The quit button will close down once we have built up the game, although it pops up an update in the console window when I click "Quit". The update informs me that the window has shut down.
I have set up the setting menu that consist of resolution, full screen, graphics (low, medium and high) and adjustable volume. There was only one script needed, Setting menu script. This tutorial already had finished templates so I used Unity's UI's drop down etc. However, I have to add some sound to make sure the volume works. Although I would like to go back and do some touch up a bit later to match the design.
This is a simple and easy game over screen, I included some animation where the background fades in and the texts slides in. I also want to add in the scoreboard as the player dies. This will be sorted later, but the game over isn't yet connected when the player dies. I will have to connect these two with each other.
One problem I came across was a GameMaster script, I kept getting errors. The script is used when the player dies and the game over screen pops up. If the script isn't there the game over screen will either be there all the time or never pop up if I disable the Gameobject.
Continuing with the problem from last week where the Game Over screen wouldn't pop up if the player died. I managed to get rid of the errors that appears on the Gamemaster script, it was mostly unnecessary parts. On the left side is the Gamemaster script, I imported the player, spawn point and game over UI, the script would make the game over screen appear. Although nothing appeared for some reason, I'm not sure what's the cause of it. However, I might think it's the health bar as the script itself says "killplayer", but it doesn't seem to work.
I thought the game over part was a bit more complex but it was easier than expected, Carly managed to get it sorted. The issue was the remaining lives which was set to 3, so when the player had died 3 times the game over screen would have popped up. Since the player will have one life it's set from 3 to 1 instead.
I have looked into a few audio in soundbible and freesound for the main menu, shooting, jump, game over, hover etc. I also downloaded a few from brackeys 2D mega packs that had most of the audio needed since it's a shooting game as well.
I created an audio folder on the left side that consist of the sound and music we will be using for our game, I have been testing the audio for different scenes (main menu, base game and fungus scene). There were no script needed for these, although adding audio when shooting, jumping or any physical movements will need a script. I tried to follow a few tutorials but there will need to be a script for each Audio clip, and I had some issues were several audio would play at the same time.
For the Main menu, options menu and pause menu I added click button sound. I followed the tutorial and there no script was needed.
1. Created an empty object named it AudioSource. Added component "AudioSource" and dragged my AudioClip into the box.
Went to each button I had (play button, score button, options button etc) and went into inspector > Button (Script) > On Click () > Pressed + to add a new window. Then selected AudioSource > AudioSource.PlayOneShot > Drag Audio clip into empty box
I finally figured out and managed to add audio for a specific asset, I added shooting sound to the gun. This process was more complex than the click button and background music, since this needed a few scripts. The scripts were Sound script and AudioManager script, I didn't understand the scripts and meaning of it first. The AudioManager allowed me to inspect all my Audio in on inspector due to the scripts. Since I wanted to add a shooting sound to the gun, I added component Audio Source and dragged my Shooting clip into the Audio Clip. Afterwards, went into the weapon (script) and coded "FindObjectOfType<AudioManager> ().Play ("Shooting");". This will make sure the sounds it on when shooting with the left button.
We considered adding audio into the game because it makes the game more playable and enjoyable rather than playing a muted game. This also gives more action etc. I'm looking forward to adding all the audio to the assets and see how much difference it will make. Assets that will have Audio:
As we received the feedback we had stuff to rework and improve our game. To make the game more playable we will rework/improve:
As we are almost finished with the scripting part, we have now decided to move on the art, I found a couple of reference images I liked, especially the pixel art. I found Destiny pixel character by Sparkley, as I think the style would suit our game. I also looked at other artists, concepts and game.
I'll be making the characters and animation for the main character in game, cutscene characters and bullets. The cutscene will consist of the soldier, commander and chief engineer, everything will be in pixels. For the main character (soldier) I will make walk and jump animation.
To create the pixels character I used Photoshop, the original size is 180x336px. Since there are way too many grids, I scaled it down to 45x84px, I basically divided 180x336px/4 and got 45x84px. This made my drawing process a lot quicker and easier as I got less grids to work with. Once I finished the character, I resize the images size to its original size having the "Nearest Neighbor (hard edges) to keep the quality.
Created a couple of pixel characters (soldier, commander and chief engineer), I was mostly creating characters with complementary and analogous colours. Science fiction is usually based on the primary colours, I selected a few I liked although I will have to ask for my teammates opinions as well.
After looking at the character we decided to go for the #1 number 5 as the main character. I did a few changes to the character where I changed to chest armour and added an utility belt. Since the team weren't sure what colour we would go for we discussed about it, we decided the main character would be the 5th one. As it's all blue and gives the sort of science fiction feeling, I personally like it as I think it will blend in well with the other assets. While deciding the colour palette for the character we were also deciding the colour palette for the environment that Carly works on, we will try different colour and put both the character and background together and see what works the best.
2. I managed to fix it as I forgot the arm is separated from the body as it has an Arm Rotation script. I replaced the TEST sprite sheet with the arm instead as I had to resize it quite a lot, although the arm won't be very visible it doesn't matter much.
The NPC commander were supposed to be either #2 - 8,9 or 11. But after asking the team's feedback they suggested it should be the same colour theme so we switched to #2 - 7 instead. I also did a touch up with the commander by adding a cape, change posture and shade it a bit more. The cape and posture was to show that he is confident, masculine, forceful, stable, elegant and secure commander.
The NPC chief engineer is #4 - 17, I also changed the colour here to stick with the blue colour theme. As I replaced the yellow colour with blue instead. A few changes I did was adding utility belt as she is an chief engineer and enhance her female body since it looked more like a male chief engineer before.
After receiving the team's feedback they thought it would be better to change the colour theme so it wouldn't be all blue. The reason was due to the cutscene, as it would be difficult to tell which character it was.
The changed I did was change the chief engineer's colour from blue to yellow, which was its original colour in first place. And the commander's colour from blue to orange.
Solider - Main character
Commander - NPC
Chief Engineer - NPC
I looked into various sci-fi weapons that I will create for the main character, Joe also recommended a site called Enterthegungeon that have loads of pixel weapons. As I'm working in 24px x 15px image size for the weapon I thought the pixel weapons (reference) would be a good guide to help me with the shapes.
I created 10 different pixel weapons and decided to import the 4 weapons into Unity I personally liked the most. The screenshots are taken in Unity and looks a lot more different in-game compared with the screenshots above. I liked the 3rd one because it had the perfect shape and the hues suits the main character.
For the main character I will create idle, jump and run animation. I began with creating the idle animation (left side), since the arm is separated from the body due to the arm rotation script I wouldn't be able to give the character much exaggeration. Although the idle animation looks alright the results wasn't the same in Unity. The problem in Unity was that the idle animation wasn't as obvious, this is because the character is further away in the Game screen.
Here is how the idle animation looks like in Unity, I changed the filter mode to point (no filter) and higher quality so the pixels wouldn't disappear. This will be the final idle animation, even though the idle animation isn't great the player will mostly move around.
This will be my first time creating a run animation, although I have done a walk cycle before. I looked at different references that can be found at the button where the Animation title is. I'm planning to go for around 8 frames as it would be the perfect amount of speed for the run animation. We want to achieve something familiar to the soldier run cycle GIF, and this also gives a better example how he runs when holding the gun. However, when creating the run animation, I will cut out the arms as one of the arm is connected with the weapon.
I created run cycle 1 at first to get a silhouette run animation, the team's feedback was that the back is a bit too straight when the character runs. So, I created a second run cycle where I made the upper body lean a bit more, but I was thinking it might not show up as much in game, so I decided to create a third run cycle. I adjusted the legs by extending them as the body proportions didn't look right. I also move the head down and forward a bit more as it's more accurate to an actual run.
Once we were happy with the silhouette I coloured the silhouette. The last feedback about the run cycle was to s to slow down the speed because the run was too quick.
Below is the sprite sheet that came to 9 poses instead of 8 poses. However, I'm glad with the outcome as I think it will look good when the main character runs with the weapon, arm and cape added. I will import the sprite sheet to Unity and make sure everything looks fine.
When the player jumps he keeps running, this problem will be replaced with a jump animation I will create after the run animation. Although the team and I thinks the run animation looks great in game.
I followed Brackeys tutorial (above) how to make the idle animation transit to run animation was simple. I used animation and animator where I imported my sprites and added animator script to the Character Movement script.
This is also my first time creating a jump animation, this will consist of an anticipation and jump. I repeated the same steps as I did with the run cycle using reference images that can be found above. I created various silhouettes, I wanted to compare how the mid-jump would look like if the legs were higher up or lower. Since our player jumps high up, I thought it may be better to have a mid-jump where the legs are higher up.
I created three different jump animation silhouettes, this is because I want to try out different jumps in Unity. I also think this is the most efficient way to find the most suitable jump for the character. This will also allow me to see if the jump goes along with the jump height in game.
I imported the jump animations to see how the jump would look like in Unity. I personally would say I prefer the first jump animation due to it's the smoothest jump and landing. Other jump animations looked weird as it looked glitched. Although I have to adjust the timing when the character lands. Another idea is to add more frames, so the jump animation looks smoother, however this is an idea for now.
Receiving the team's feedback, they thought the animation looks great, but suggested to change the gravity to time the landing or the mass of the player. They also liked the idea to add more frames to make the jump animation look smoother.
3. Right - Jump animation
Once everyone was satisfied with the silhouette jump animation I coloured the silhouette. I increased the gravity so the jump wouldn't delay with the landing. However, I got rid of the last landing pose due to it kept appearing mid air. The jump animation looked a lot smoother and better in game once the gravity got increased and landing pose was removed.
An overview of the final jump animation in Unity, I imported it into our Original Unity game later. I adjusted the collider of the floor etc. since the character was inside the object for some reason even though the collider was correct.
I imported the character animations into our original Unity project, and this is the outcome. I'm quite happy with the results, although I think I could have improved the jump, but the team was happy with the animations. The other sprites are made by Carly, Joe and Gaddafi, all the final pieces put together looks way better than our TEST game. And especially adding all the sprite animations made the game a lot more intense and interesting.
This is the first group project in the first year and it has been a fun and learning experience. My group has been very efficient where we have planned meetings once a week to catch up with our individual tasks for the game. If any issues occurred someone else would jump in and help, this really eased our research and work. With the honest feedback we could improve our individual assets so everyone would be satisfied. I think we achieved our scope pretty good the fungus scene, 2D platform shooter, Level 1 & 2, boss battle and game over. Although the scoring system was included in the scope, we decided to skip it since it wasn't an important part in the game, the art and making a workable game was our priority. We achieved most of our scope following most of Brackey’s tutorial, this was because he made a 2D platform shooter game playlist which had most of the stuff we needed.
Since everyone has different art styles it would be difficult to match each other's art styles. However, we decided to go for pixel art as it's simple and easy to learn. Although our final assets came out differently, we could have discussed the pixels better, but I think all the pieces put together came out good either way.
My first task was to do the health bar and loop level, I managed to make the health bar work but there were some issues with it. And I didn't manage to get the loop level sorted, so Carly and Joe got it sorted. Other areas I worked with was the UI (pause, game over, options menu and main menu), this was easier than expected. But I should have done a quick UI layout, this is to ease my work although I will do it next time. For the group project I worked a lot in the animation area, the game over UI where the text and buttons would slide in. I got a better understanding how to use both the UI and animation in Unity that will be useful in the future. When creating the NPC and main character I learnt that making several silhouettes eased my work, especially when it came to group projects. Receiving the feedback and trying it out in Unity made me go back and forward to improve my sprites.
The animation was the most difficult part for me, I created idle, run and jump animation. Considering I have done animation in other modules before I had a basic understanding of the movements. But I haven't done these three movements before, due to this I had to do a lot of research, as you could see I created several animation silhouettes so I could compare and see how the movements behaved. This was also adjusted through my teammates opinions to improve the animation, I'm happy with all three animations. The animation also did a huge difference in game as it made it more interesting. Including the audio, I added audio such as background sound, shooting, enemy etc. Both the animation and audio changed the gaming experience, I would consider using this for my next project since it improves the gameplay and game experience.
Overall, I'm satisfied with the final 2D platform shooter game as I enjoyed working with the team. We had a good work ethnic which allowed us to plan and finish things on time. I also find this important so we could teach and develop each other when it comes to working in groups. There were a few areas we did bad such as matching the pixel art, although I think we did great in everything else. We could have discussions without any problems, if there were any disagreements, we could sort it out without any issues. From this first year group project, I have learnt a lot, and this will be useful for future group project and in the gaming industry.
WORDS: 661
[1] Brackeys, (2018), How to make a 2D game in Unity, [Online], Available from, https://www.youtube.com/watch?v=on9nwbZngyw [Accessed 1 February 2019]
[2] Alexander Zotov, (2017), How to create a simple UI health bar for a character in Unity game. Easy tutorial., [Online], Available from: https://www.youtube.com/watch?v=l11fkFoFfrg [Accessed 2 February 2019]
[3] Brackeys, (2017), START MENU in Unity, [Online], Available from: https://www.youtube.com/watch?v=zc8ac_qUXQY&t=10s [Accessed 14 February 2019]
[4] Brackeys, (2017). PAUSE MENU in Unity, [Online], Available from: https://www.youtube.com/watch?v=JivuXdrIHK0 [Accessed 15 February 2019]
[5] Brackeys, (2017). SETTING MENU in Unity, [Online], Available from: https://www.youtube.com/watch?v=YOaYQrN1oYQ, [Accessed 21 February 2019]
[6] Brackeys, (2015), 23. How to make a 2D Platformer - GAME OVER - Unity Tutorial, [Online], Available from: https://www.youtube.com/watch?t=159s&v=bSG5m0Q6W4c , [Accessed 22 February 2019]
[7] PixelShell, Freesound, [Online], Available from: https://freesound.org/ [Accessed 1 March 2019]
[8] Troublesome Girl, (2017), Ep 10. Click button to play audio/ sound effect without script - unity tutorial, [Online], Available from: https://www.youtube.com/watch?v=kl7LZ6JQe1M [Accessed 3 March 2019]
[9] Brackeys, (2017), Introduction to AUDIO in Unity, [Online], Available from: https://www.youtube.com/watch?v=6OT43pvUyfY [Accessed 8 March 2019]
[10] The Meme Economy, (2017), Soldier Run cycle, Pinterest, https://www.pinterest.se/pin/96194142021508718/?lp=true [Accessed 11 April 2019]
[11] Brackeys, (2018), 2D Animation in Unity (Tutorial), [Online], Available from: https://www.youtube.com/watch?v=hkaysu1Z-N8&t=736s, [Accessed 23 April 2019]