Game Developtment - Final Task




   

Week 5-8

Justin Averill Prasetya / 0355048
Game Dev / BDCM / The Design School
Task Final Task


INSTRUCTIONS




Parallax Background
This script I've made ensures that the background in my game moves with the player but at a slower pace, creating a depth effect known as parallax. It adds visual immersion by making distant objects appear to move slower than closer ones, enhancing the overall feel of my game world.
Fig 1.1.1
I improve it by layering the background so it adds more depth. Also, i set it up with different speeds and offsets so it looked like unrevealing something

Fig 1.1.1,5

Player Controler 
Firstly is a declaration which functioned as Define and initialize variables used throughout the script
Fig 1.1.2

Void start is used for initialization tasks that need to be performed once at the beginning of the script's execution or when the GameObject is enabled.
Fig 1.1.3
Movement script
Fig 1.1.4
Jump
Fig 1.1.5
Animation
First, I made the character movement frame by fame I compiled it in the unity, and applied it to the script modifier
Fig 1.1.5
if (isOnGround): Checks if the player is on the ground.
animator.SetBool("IsIdle", true); and animator.SetBool("IsRun", false);: Sets animation states based on whether the player is moving (IsRun) or idle (IsIdle).
Fig 1.1.6
Crate 
To ensure the crate doesn't glitched out and go anywhere
Fig 1.1.7

Enemy Manager and Controller
The script controls my enemy and sets up their wander area and probability to go anywhere because I wanted to make it random, but I got an issue with that, it always had a bug where the character was stuck in 1 place. But here's the code that includes the necessary conditions to make the enemy function. Because of this script as well the movement speed could be different everytime you entered the game

Declaration 
Fig 1.1.8
Script that deals damage to the player, by colliding with the box collider 2d.
Fig 1.1.9
Enemy Animation
Tree Enemy
Fig 1.1.9

Skeletal Enemy and Boss
Fig 1.1.10

Rolling Ball
This one i only adjust the rotation value on the condition.
1.1.11

Moving Platform
First, we need to set up a start point and the endpoint using game object.
Fig 1.2.1
Afterward setup this declaration and if you want you could set up the on gizmos to define the start point and endpoint clearly.
Fig 1.2.2

Platform Effector
To make the platform passable, we need to set up an effector linked to the collider 2d by checking the effector.
Fig 1.2.3
Projectiles
For my boss battle, there will be a flying projectile that could follow the player, I got the code from a YouTube tutorial. By converting the projectiles to prefabs, we could spawn the game object anytime by using set active and by linking to my enemy manager it could deal damage. 
Fig 1.2.4
Item Collecting
The collecting item is basically i wanted to set a certain value and when the value is fulfilled you could get transported to the next level. This one linked to the collectible object
Fig 1.2.5
This one functions as the collector on the player.
Fig 1.2.6
Video Player / Checkpoint
First, i made the video using After Effects as a cutscene, but before that I drew the assets first with Krita.
Fig 1.2.7
Final Outcome
Fig 1.2.8
End Credit
Fig 1.2.9
for this one, I only put the video player and linked the texture between an empty game object and with raw image. but I encountered an issue when I uploaded it to the web gl the video wouldn't play even tho I changed the source to URL and online.
Fig 1.2.10

Checkpoint
For the checkpoint, I took the code from Mr Razif's tutorial, by putting a game object that linked to the box collider set it into is a trigger, and linked it with this script which controls the vector2 coordinate of the player.
Fig 1.2.11
Player Controller:
Fig 1.2.12



Checkpoint Animation
Fig 1.2.13

Playable Game Before Enhancement: https://thebookofantares.netlify.app
Playable Game After a bit of change: https://bookofantares.netlify.app/

Game Document: 


Comments

Popular Posts