Games Development - Exercises

06.04.2023 - 06.07.2023 ( Week 1-Week 14 )

Michelle Angeline Gunawan / 0349760 / Bachelor of Design in Creative Media
Games Development
Exercises


EXERCISES

Week 1 - Exercise 1

During our first meeting, we were introduced to a website that contained a wide range of games created by our seniors. We were given the freedom to choose any game that interest us and play it. The experience of playing the games was not only fun, but it also provided us with a great opportunity to observe the mechanics and the design of the games. As an exercise, we were then asked to write a review of one of the games that we played. This exercise helped us to better understand the different aspects of game design, such as story-telling, game mechanics, and user interface. I choose Misty Night, created by Tamara Audrey.


Misty Night by Tamara Audrey Game Screenshot 

Game Review

Pros:
  • The game's color palette fits well with the game's theme
  • The characters and surroundings are neatly designed. The textures and details are well-made. This adds to the overall aesthetic of the game.
  • The game motivates players to keep playing in order to succeed. With each level, the challenge progressively increases.
  • The design is consistent throughout the game.
  • The game assets are varied, including platforms and obstacles that move to make the game even more challenging. The variety of assets adds more complexity to the game, making it more engaging and entertaining.

Cons:

  • The sound is encouraging at first, but becomes boring over time. The music and sound effects are well-made, but they can become repetitive and monotonous after a while. It would be nice to have more variety in the sound design.
  • It is difficult to control the character when jumping and climbing platforms to avoid obstacles. This can be frustrating for some players.
  • There are some bugs in the game, such as the character getting trapped in an area and being unable to move. These bugs can be game-breaking and can ruin the player's experience. It would be helpful to fix these issues in future updates.
  • The placement of checkpoints could be improved. I had difficulty reaching the next checkpoint because I kept falling. This can be frustrating for players, especially if they have to repeat a large section of the level.
  • It would be better to provide easier obstacles at the beginning of the game. Some players may find the initial levels too difficult, which can discourage them from continuing to play. By easing players into the game, they are more likely to enjoy it and become invested in the experience.

Week 2 - Exercise 2

This week, we were formed into a group to discuss an idea for a game by choosing one of the four methods that had been explained before. I was grouped with Esther, Audrey, and Luisa. At first, we collected game ideas by searching for popular games. I found GTA and suddenly thought about what if we played GTA, but as a good, contributing citizen of Los Santos?

Then we create a presentation using Canva and start to put our ideas there using 3I methods. We inverse the idea of GTA by playing it as a good citizen.
Group Presentation

We are the fastest group to finish our work and so we went as the first group to present in front of the class. After the presentation finished, Mr. Razif gave us some questions.

Week 4 - Exercise 3

For this week's exercise, we used Unity. Firstly, we need to make a new project with 2D core. Then, we create a new 2D object > Sprites > Capsule.


Another object we create is the ground. 
2D Object > Sprites > Square
We can change the color under the Sprite Renderer > Color 


In order to make each objects can collide to each other, we need to add components.
Add components > Physics 2D > Object Collider.

In order to make them fall, we can use rigid body 2D under the components

Next thing, we need to launch our character into a seesaw and make the ball jump and crash the boxes. We need to use physics and just edit the mass to make it works.
 

Then I make another scene from the same project. Making a character using capsule and then we add a script to it.
Add components > Script, then name it as "CharacterControl"


And when we click on edit script it will bring us to Visual Studio Code. The goal is to make the character move and jump by us controlling it. And on a condition where the character can only jump once or twice when it hits the ground. The whole coding is here.


Now we can control our character to move and jump.


Week 6 - Exercise 3


Create empty and name it as doorTrigger. Then add box collider and check the "isTrigger" box. Next, we want to add script to the door trigger. Below is the script for the doorTrigger


The output should look like this


Next, we want to add animation to the door when we pass through it. First we need to create an animation called Door_ilde and under the animation there is a triangle and click it to create another animation under the same folder and name it as Door_open


Then we want to press the record button


And then we want to click on the timeline where you want to put the end of the animation for the door, for my exercise I put it on the 1.00 and we want to drag the door upwards


Then, we want to go to our script and add
Animatior anim; under public GameObject door;


After that under the void start we can type 
anim = door.GetComponent<Animator>();


Then we can set the door.SetActive into a comment by adding //. Now we add 
anim.Play("Door_open"); so that the door can open when we hit the trigger.


The output should look like this


Next, we want to create another animation clip called Door_close. And then we want to copy the animation from Door open and paste it on 0.00 for door close and to make the closing animation we can add the first position of the door open to last position for the door close




Don't forget to uncheck the loop time for the animation


Then we want to duplicate the door trigger so that when the character pass the door, the door will close. We name it as doorTrigger2


Then we can move the door trigger next to the door


But then we cannot use the same script so we need to remove the existing script on doorTrigger2 and create a new one. We type this and we want to drag the door animator to the doorTrigger2 anim



Then under the private void we want to type it the same as doorTrigger before but this time we want to make it close so we put the door_close instead of open


The output should look like this
...

The next thing we want to do is to add item like a key to make the door open and scale it according to the character size. Then add box collision to make the key interactive



Don't forget to check the is trigger


Then under the character control script we want to edit it there. Under the ontriggerenter2D, we want to add another condition


We want to make the door open only when the character has the key, so we want to add another bool under character control script


Then moving on to the doorTrigger script, we want to add another public variable that can connect and add another condition under the private void


Next we can drag the Character into the player under the doorTrigger script


And finally we want to add the true condition under character control script


The output should look like this


Next thing is we want to add coins. Add the assets that you want and make sure to check the is trigger. Then we want to add script for the coins and type this


For now if we want to duplicate the coins and all of them has the same functions then we can click "overrides" -> apply all.


But if we want to make the game file look more proper, then we can change the coding from setactive to Destroy(gameObject);


Then we want to add another condition that if we collect the coins the value will add up.


But don't forget to add another variable under the charactercontrol script


Also to drag the player into the coins script (for now assign it one by one)


The output should look like this


Next we want a to make the character collect 30 points from 3 coins. So, we want to add another variable (int) called "coinvalue" so then we need to change the "10" into "coinvalue"


Next thing we want to do is to make the camera focus only on the character when it is moving. So we just have to put the main camera under the character and set the character's x position to 0.



Another recommended way is to use a component called cinemachine. Go to window >  package manager > Unity registry and find cinemachine and install.


Then under hierarchy add cinemachine > 2D camera. After that under the inspector, we want to make sure that it follows our character so we're going to click and drag our character to the follow transform field. the camera will follow the character but at the moment the Viewpoint is a bit weird because it's very scented like this we probably want it to be way at the bottom here for the ground so that we have more space so in order to adjust that we can look at the parameters. Adjust the x and y screen.


The output should look like this


Next thing we want to do is to animate the items when it got collected so that it won't just vanish like that. First thing to do is to create an animation for the key and named it as key_idle. At idle state the key will just move up and down.


Then we want to create another clip when the key is collected (name it as "key_collected"). First animation is to make it goes up. Then we want it to disappear, so we add another property. Add property > sprite renderer > color


Then expand the property and change the color a (alpha) to zero and the end of the timeline.


Then edit the character script and add assign the animator under the public and name it as "keyAnim"


Next is when we detect the key instead of destroying it, we're not going to destroy it. We want to register that we have the key so we're not going to change that we're just going to change how it disappears.


Then we want to drag/ assign the key animator to the key anim under character script


Because it will still looping after we collect the coin, we go to animation file and choose the key_collected and uncheck the loop time.


But after we collect the key, the key component is still there but not visually there. We want to make it disappear so what we want to do is to add the destroy function but add the time.


The output should look like this


 Week 9 - Exercise 3

First thing to do is to create an empty gameobject under the Character and name it as spawnPoint. Then create a circle sprite as the bullet and add rigidbody 2D and circle collider. Don't forget to uncheck the simulated under the rigidbody. (need to uncheck it later and change the gravity to 0)


Then we go to 

REFLECTIONS

Week 2
This week the first lecture was given and it was about game ideation. After the lecture session was over, Mr. Razif divided us into groups. We discussed and we found a very funny and interesting idea. The whole process was very entertaining and I really enjoyed the class that day. We even came forward as the first group for the presentation. One class laughed at our presentation and it was satisfying for us. 

Week 3
Public Holiday

Week 4
This week, we tried Unity. We learned to create basic scenes so that later we could start working on our prototype. The work involved coding and that's when I worried about my future projects. But after trying, I kept convincing myself that I could definitely do it.

Week 5
Public Holiday

Week 6
This week, we conducted an online class because the air conditioner in the classroom was broken. In this class, we learned how to make items and make doors open and close under certain conditions. We also learned how to animate items as they are collected. In this class, I missed a lot because of an error that slowed me down. But the recording class on Youtube really helped me catch up. I also blog while working on tutorials and this slows me down as well. But I believe this week's learning will be very helpful for my future projects

    Comments

    Popular Posts