Game Development-Task 3

14.06.2024-10.07.2024 / Week 8-Week 11
Kor Qian Qian / 0359496
Game Development / Bachelor of Design (Hons) in Creative Media
Task 3


INSTRUCTIONS




Task 3

In previous task, we have done the design for the game assets. In this task, we given the task to create the prototype of the game.

This includes :

  • Coding movements and actions
  • Coding obstacles and enemies’ interactions
  • Coding game levels (Logic of the game)

I will show my game mechanics of level 1 and level 2 in this task, which my third level is the combination of this two.

Level 1

In level 1, players are tasked with limited energy challenge to break as many rocks as possible to collect valuable diamonds. The scene is filled with rocks that players must break using their tools. In my proposal, I introduced the mechanism of this level, which is to complete the game within a limited time instead of within a limited stamina. I think the switch to limited stamina will make it more challenging and more logical.

Player Movement

This is my level 1 player movement animation script (I have a different player script in level 2, because this script when player enter trigger area with box collider 2D component, the player speed become very slow.) I apply the idle, walk and jump animation in level 1.


Energy Bar & Diamond Counter

I created a energy bar for the player, it will decrease when player breaking the rock, so breaking the rocks and reduce energy key is the same, using "X" on keyboard. I search for few tutorials video from Youtube to create this two UI. 



Get Diamond

When hit on "X" key inside the rock trigger (which is where closing to the rock), the rock animation will plays, and the diamond appears, the energy bar decrease and diamond counter +1 at the same time.


Add Energy

Player can increase their energy by collecting food. The energy bar will become red colour when it is going to finish. When player energy exhausted, the level is over.


Door

As what we learn in class, I set the door will only can open if the diamond is collected more than 4.



Level 2

Player Movement

This is the player movement script for level 2. I did not include the walk and jump animation in it, because I'm focusing on solving the player getting slow when enter the trigger area. Luckily, using this code doesn't happen the issue (but having problem to include the jump animation arghhhhhhhh, I can solve it :) !!!). 


Enemy Path

I used 2 ways to add the path, one is the enemy will follow the exactly path where the player move, another one is the enemy just wandering in fixed position.

Path 1

https://youtu.be/jvtFUfJ6CP8?si=FcM_67EkC6_29xfP

I search for a tutorial that make the enemy follow the player move. I download an AI pathfinder file and can install it easily to the enemy and it can follow where the player go.

This is using the Pathfinder component to detect the ground, it makes the enemy bypass or not allow to cross the ground.


Path 2

The second movement is enemy just moving between the fixed point. I set 3 points for the enemy in this GIF, so the enemy just repeating to move between this points.



Stamina Bar

Same code with the energy bar script, but using fixed mode for the gradient.



Collectible Live




What's done

  • Player movement speed/action/anim
  • Enemy attack
  • Collectible item/appears after player make an action
  • Energy bar, Stamina bar, diamond counter

What's yet to be done

  • Starting page/Introduction page
  • Game over page/Successful page
  • Sound effect/background music
  • Virtual camera change between different action
  • Player attack/breaking rock's anim


Walkthrough Presentation

https://youtu.be/TJ1OyFX0Xn4





Reflection

Reflecting on Task 3, I am back to Unity after many months. This time, the experience is completely different from my previous work in experiential design. Fortunately, what I learned in class is applicable to my current project, and YouTube offers plenty of instructional videos. ChatGPT also occasionally helps me solve challenges. Although this is not the final product and I've spent many difficult days working with Unity, seeing my game become playable makes it all worthwhile. Quietly speaking, there is still a difference between the final product and my initial proposal. I hope I can meet my original standards in the final project.


Comments

Popular posts from this blog

Advanced Interactive Design-Final Project

Advanced Interactive Design-Task 1

Minor Project-Pink Stuff