Games Development - Game Prototype (Task 3)

20/11/2024 - 16/12/2024 (Week 9 - Week 12)
Katelyn Tan Kye Ling (0354148)
Bachelor Of Design In Creative Media (Games Development)
Task 3 - Game Prototype


LECTURES

Week 9 - 20/11/2024
For today's class we continued from week 7's exercise. We first learnt how to add sprites to the game. So from week 7's prototype coins, the coin now has animation and more life to it. We also learnt to add an animation when the coin gets collected. After that sir taught us on how to add conditions. For this game, the condition was that if you collected 3 coins, a key will appear. And after collecting the coin only then the door will open for the player.
Fig 1.1 Week 9 - In class Exercise Video

 Week 10 - 27/11/2024
This week we had class online. We learnt how to replace the prototype assets with the actual assets. Then we learnt how to add the different animations of the character sprites to the game and making sequences for them as well (Example: Transitioning from idle to running, running to attack etc.). Then we were taught how to attack an enemy and make it die when hit a few times. After that, we learnt how to add an effect to the enemy when getting hit as well as an animation when the enemy dies.
Fig 1.2 Week 10 - In class Exercise Video

Week 11 - 4/11/2024
This week we continued where we left off from last week. We started off with adding a health points system where every time the player collides with the enemy, a certain amount of health points is deducted. Then we added a health bar to show it decreasing whenever health points is decreased. 

We also haven't added the "die" animation in our game so we added that and added its transitions in the animator. After that, we learnt how to show visual feedback, where the player would turn red in colour and have a knockback when get hit.

Next, we learnt something that could add more dynamics to our game. We leant how to add randomizer to both the knockback/knockup when the player gets hit, and also randomizer to the health damage an enemy receives. Lastly, we learnt how to add a HP bar to the enemy as well.

INSTRUCTION


Animation
I continued with my animations that I haven't completed from my previous tasks. I didn't do a good job for the running animation for Sally (the main character) previously. I decided to look at how other artists do the running animation and used a running cycle I came across as reference (Click here for link to reference).

Fig 2.1 - My reference

Fig 2.2 Sally Running Animation

After that I added a sword to the running animation for when after Sally equips the sword given by her mother (the angel).

Fig 2.3 Sally Running With Sword Animation

Next I did the attack animation, I struggled with this because my sword looked really weird when drawn straight. It looked better when it is slanted. So I looked at a reference. However, the reference was not exactly the same as mine and was hard to copy so I tweaked a few parts and frames myself. (Click here for link to reference).

Fig 2.4 Attack Cycle Reference

Fig 2.5 Sally Attack Animation

Prototype
For my prototype these are what I decided to test on:
- Movement of player 
- Clue collection 
- Obstacle (Rock & Bridge)
- Interact with Character 
- Equip sword 
- Attack mob + mob's animations
- HP Bar (Both player and mob)

Progress

Week 9:
In week 9, I started off with the background of my game. I watched a tutorial on how to layer the background (Click here for tutorial). After that, I did the tiles/ground of the game. I also watched a tutorial on this on how I could create a tilemap and "paint" the tiles (Click here for tutorial).
Next I worked on the movements of the player and created the animation sequence for it. In this week I just worked on the idle, run, jump sequence.
Fig 3.1 Week 9 Progress

Week 10:
This week, I added some elements into the game. I first did the clue collection part by using the coin collection in class exercise that Mr. Razif gave us a tutorial on in week 7. Then I added the obstacle where the player had to push obstacle to jump above and get to top of next platform. I wasn't sure why, but there was a glitch when Sally had to push the obstacle while running.
After that, I watched a tutorial on how to interact with a npc, I was able to debug it but the debug appears even when I'm far away from the npc. (Click here for tutorial).
Lastly, I also did the equipping of the sword, same way as did clue collection, but I was not sure how to switch to another character animation with the sword once the sword is collected.
Fig 3.2 Week 10 Progress

Week 11:
This week, I had an online consultation with Mr. Razif. He asked me to record my issues of the prototype in a video and send the unity zip file to him.

Fixing Issues:
Issue 1:
Fixed the pushing rock/obstacle glitching part. Turns out my collider for Sally's running state was too small, causing the rock and Sally to go into each other

Issue 2:
Fixed the part where the NPC interactable function happens no matter how far Sally is. Turns out my code was missing something. Sir taught me to add a code where it would draw a red circle at the position of where the game object is attached to at a certain radius. I also attached the Player interactable to the wrong character, which was supposed to be Sally (main character) instead of the NPC.

So now the script will look for the game object that the red circle is colliding with when "E" is pressed. And when it collides with any collider, it will check whether that game object that is colliding with it has the script called "NPCInteractable".
Fig 3.3 NPC Interactable

Issue 3:
There was a lot of space at the bottom of the game, so Mr. Razif taught me to adjust the virtual camera's body with the screen y feature. He mentioned that I should also add more tiles at the bottom and raise the screen y higher so the game doesn't have so much ground showing. Mr. Razif also suggested I add a rigidbody 2D to the start of the game so that the player doesn't fall off the game.

Week 12:
This week I decided to add another obstacle. I added the bridge and water below, where if the player falls into the water the player will die. However, the hole in the bridge does not let the player fall through as if there is a collider there. I've already removed the colliders and adjusted it according to the bridge size but it still doesn't work.
Fig 3.4 Player not able to fall through

Next, I decided to add the enemy (Swampchomper) to the game and add its animations as well. Then I did the attack enemy part and made it die when hit a few times. After that, I added animations to the enemy when getting hit as well as the sprite when the enemy dies. Next I set the health of Sally to 100f and every time she collides with an enemy she gets 10f taken away. When that was successful for both Sally and Swampchomper, the last thing I did for my prototype was adding the health bars to both Sally and Swampchomper. 

What is left to do:
So far I've already done the base of the game like the background, movement of character, enemies etc. Right now I just pretty much have to add the UI and also decorations here and there.

List of what is left:
  1. Decorations around the game.
  2. UI toggle buttons. (Sound button & Pause/Play button)
  3. Clue collection pop up.
  4. Dialogue pop up.
  5. Switch main character's sprite when sword is collected.
  6. Add more obstacles.
  7. Add NPC (Roger)
  8. Final scene - House.
  9. Add sound effects.
FINAL SUBMISSION

Video Presentation:


FEEDBACK

Week 11: 
- Make a video of your game's issue and send it to me along with the ZIP folder of your game.
- Sir's Feedback: 
1. "This is the pushing glitches  part and the interact part only first ya."
2. "This is for the background/ground visual issue."
https://www.youtube.com/watch?v=netqL1tVWTs 


REFLECTION

Experience
I personally felt that this was one of the assignments that I enjoyed doing the most. It felt so amazing seeing the character I created my ownself come to life and even have animations. It felt like my hard work paid off. I also am really grateful for the tutorials that Mr. Razif taught us in class during the weeks as I could apply them to my game. No doubt, every assignment has its ups and downs. There were a few times where I struggled to get what I wanted to work, but through perseverance and the guidance and help from Mr. Razif, I was able to pull through. Overall, it was a slightly stressful but great experience. I sure hope that I will be able to complete my entire game smoothly in my final project.

Observation
I observed and learnt from my mistake that it is much easier to have all your sprites and UI assets ready before starting your entire game. Thankfully I am currently working on the prototype and not the full game yet but it was still slightly hard to do certain things without having everything yet. Lastly, I also observed that breaking the prototype into smaller, manageable tasks helped me stay organized. However, I observed that working on multiple features at once, such as animations and mechanics, sometimes resulted in slower progress overall.

Findings
While working on my prototype, I realised many things. This process taught me how important it is to test as I go and fix things right away. I also learned that it’s okay to make mistakes because every issue I solved made me feel more confident in my skills. Another thing is that since I was young, I have played all types of games. From mini games to even PC games. I did not think so deep into it on how difficult it is to create a game. It is extremely time consuming and also requires a lot of effort. Therefore I find myself appreciating game creators much more.

Comments