Games Development - Lectures & Exercises
Lectures & Exercises
TABLE OF CONTENT
1.
Lectures
2.
Instructions
3.
Exercises
4.
Feedback
5.
Reflection
LECTURES
WEEK 1:
Elements of a Game: Story
- How What Happens
- Affects Someone
- In Pursuit of a Difficult Goal
- How he or She Changes
Story Arc:
- Introduction: Characters, premise, goals.
- Challenges: Obstacles to overcome.
- Final Battle: The ultimate challenge (e.g., Boss Fight).
- Conclusion: What happens afterward.
Fig. 1.0 Story Arc
Elements of a Game: Gameplay
- Challenge: Introduces difficulties for players to achieve objectives. Excessive challenges can lead to frustration.
- Strategy: Players must think critically to navigate challenges (e.g., Tetris block placement).
- Chance: Elements that extend gameplay, such as rewards and bonuses (e.g., extra lives, health boosts).
- Choice: Found in RPGs, player decisions impact relationships and story progression.
- Luck: Random elements that can change the game's outcome, offering unexpected advantages.
WEEK 2:
How to Generate Ideas for Your Game
1. Brainstorming: A group technique where participants share ideas
freely without criticism, aiming for quantity and creativity.
2. Brainwriting: Participants write down ideas on paper and
pass them around for others to build upon, reducing social pressure.
3. 6-3-5 Method: Six people write three ideas in five
minutes, then pass their papers to the next person, resulting in 18 ideas
after five rounds.
4. SCAMPER:
- Substitute: Replace parts of your idea with something else.
- Combine: Merge different ideas or concepts together.
- Adapt: Adjust existing ideas to fit your context.
- Modify: Change elements to enhance the idea.
- Put to Another Use: Find alternative applications for your idea.
- Eliminate: Remove unnecessary parts to simplify.
- Reverse: Consider the opposite of your current thinking.
5. 3(I) Method:
- Inquire: Ask open-ended questions about your game.
- Imagine: Brainstorm a wide range of possibilities based on your inquiries.
- Innovate: Refine your best ideas into actionable concepts.
WEEK 4:
Game Design
INSTRUCTIONS
<iframe
src="https://drive.google.com/file/d/16VSh6wieBqDwYjusJyoYSigRVLweE3PE/preview"
width="640" height="480" allow="autoplay"></iframe>
Exercises
Week 1: Exercise
In this exercise, we are required to select a game made with Unity from
this website
to conduct a critical review. After playing all the games, I chose
"Reaper Test" as my preferred option.
Story:
Kuro, a normal human being has pass away due to a car accident and was
chosen by the gods to be the next grim reaper. In order to become one,
he must first pass the test of the gods. The task is to reach the top of
the floating tower (Hells Points) without fail. This is a game which
require players to utilise their skills and reflexes in helping them get
through 3 levels of the game.
Fig. 1.0 Reaper Test by Sam Mun Hoe
- Challenge: The game has three levels, and the difficulty goes up, but I found it a bit too hard.
- Strategy: In some parts of the game, players need to think to get through, like pushing pumpkins to use as steps to climb up.
- Chance: Players earn energy by defeating enemies. This energy can help move things or defeat more enemies. If players get hit by enemies, they lose health but don’t die right away. However, if they touch spikes, they die instantly.
- Choice: There are no choices.
- Luck: There are no luck elements.
Strengths:
- The game's purpose and story are clearly communicated, allowing player to understand what they are doing.
- The gameplay tutorial is simple and easy to follow (Fig. 1.1 ).
- The actions are smooth and responsive, with no noticeable delays.
- Upon death, player can respawn at the last checkpoint without having to restart from level one, and their health is fully restored.
- The design is aesthetically pleasing and clean, primarily featuring darker tones that create a spooky atmosphere, yet the characters and enemies are quite charming (Fig. 1.2).
Fig. 1.1 Gameplay tutorial is simple
Weaknesses:
- When player is attacked by enemies or dies, there is a lack of sound and visual feedback, with player only noticing their health decreasing.
- There are also no audio or visual effects to celebrate player achievements upon completing tasks or defeating enemies, leading to a diminished sense of accomplishment.
- The game’s difficulty is exceptionally high, with some sections requiring precise timing, making it easy to die. This may lead to player frustration and impatience. (I found myself stuck on the second level, Fig. 1.3, and after over half an hour of attempts, I decided to give up—I was at my wit's end.)
Fig. 1.3 I got stuck here ( TT ^ TT )
Week 2: Group Activity
This week, we had a group activity where we needed to create our own
game idea using either of the two methods or both. We developed the
game story and gameplay and explained how elements from other games
were used in our game idea called 'Zombie Chef.'
Fig. 2.0 Zombie Chef
Week 3: Implement Player Control
This week we started using Unity, and I think it’s really fun. Through
the 2D exercise (Fig. 3.0), I learned about Rigidbody and
BoxCollider.
Rigidbody System
- Mass: Controls how heavy an object is; heavier objects push lighter ones.
- Drag: Air resistance during movement; higher values slow down movement.
- Angular Drag: Air resistance during rotation; higher values slow down spinning.
- Use Gravity: Enables gravity effects on the object.
- Is Kinematic: Disables physics interactions, allowing manual control.
Collider System
- Trigger: Activates events when an object enters.
- Obstacle: Blocks movement, like walls.
- Raycasting: Detects hits when a line intersects with objects.
Fig. 3.0 2D Exercise
Next, we need to do a 3D exercise, and the specific steps are all
detailed in the Fig. 3.1 PDF. This exercise helped me understand a bit
about scripting in Unity. Through scripting, we can make the camera follow
a target object, and I can also control the object's movement in all
directions using the keyboard.
Fig. 3.1 Chapter 01: Implement Player Control
Fig. 3.2 Final Prototype 1 Outcome
At first, I didn’t understand what Challenge 1 was about, so I followed
the instructions in the slides, which resulted in something like Fig.
3.0. I made the propeller spin, and I used the keyboard's up and down
arrows to control the plane's vertical movement, while the left and
right arrows controlled the plane's turning (which was not originally
required). Later, I realised I had made a mistake. In Unity, there are
samples Challenge 1, and the instructions also include an outcome video.
So I followed them to add obstacles and adjusted it to control the
plane's vertical movement only.
Fig. 3.3 Challenge 1
Fig. 3.4 Final Challenge 1 Outcome
Week 4: Implement Basic Gameplay
This week, we learned how to create a game where the player can use
food to hit animals that keep spawning. I found the result quite fun,
but even though I followed the steps in the Fig. 4.0 PDF, I faced many
challenges, such as the food not being able to destroy the
animals.
Fig. 4.0 Chapter 02: Implement Basic Gameplay
There are the following five scripts in this project, along with a brief
description of their purposes:
- PlayerController: Moves the player left and right and allows them to throw food.
- MoveForward: Makes the food move forward when it is thrown.
- DestroyOutOfBounds: Deletes food or animals when they go off the screen.
- SpawnManager: Spawns animals at specific intervals during the game.
- DetectCollisions: Checks when the food hits an animal and makes both disappear.
Fig. 4.1 Prototype 2 scripts
Script:
- Conditional Logic: This checks if an object is outside certain boundaries and keeps it inside those limits.
- if (transform.position.x < -xRange) { ... }
- Prefab Creation: This allows you to create copies of game objects (like projectiles) that can be used multiple times in the game.
- Instantiate(projectilePrefab, transform.position, projectilePrefab.transform.rotation);
- Collision Detection: This detects when two objects touch each other and defines what happens next (like destroying them).
- private void OnTriggerEnter(Collider other) { ... }
- Game Object Management: This removes objects from the game when they are not needed anymore, helping to keep the game clean.
- Destroy(gameObject);
- Randomization: This picks a random item (like an animal) from a list to add variety to the game.
- int animalIndex = Random.Range(0, animalPrefabs.Length);
- Invoking Methods: This allows you to call a function repeatedly after a set amount of time.
- InvokeRepeating("SpawnRandomAnimal", startDelay, spawnInterval);
Spawn Manager:
- Object Generation: It is responsible for periodically spawning objects in the game, such as enemies or items.
- Position Control: It determines where these objects appear in the scene, ensuring they spawn in appropriate locations.
- Randomized Spawning: It can randomly select which object to spawn, adding variety and fun to the gameplay.
- Quantity Management: It can limit the number of objects in the scene to prevent excessive spawning that could affect game performance.
I think the final result is really fun, but I set their speed up too
high, so it got super challenging, and I ended up losing really fast,
haha! When I lost, 'Game Over!' popped up at the bottom, but I couldn’t
capture that text in the video (and I have no idea why).
Fig. 4.3 Final Prototype 2 Outcome
Fig. 4.4 Final Challenge 2 Outcome
Week 5: Implement Sounds and Effects
This week, we need to make a 3D endless side-scrolling runner game
where players control a character to jump over obstacles. I actually
think this game is quite challenging to make, with many steps
involved, but in the end, it can be done successfully.
From this game, I’ve learned how to control the player model’s
animations and how to create a dynamic repeating background to make
the game feel smoother. Besides that, I’ve also learned how to add
explosion and splash effects when the character jumps or collides
with obstacles. Plus, I figured out how to add background music and
sound effects, like jump sounds and crash sounds.
Fig. 5.0 Chapter 03: Implement Sounds and Effects
Fig. 5.1 Prototype 3 scripts
Fig. 5.2 Final Prototype 3 Outcome
Fig. 5.2 Final Challenge 3 Outcome
Week 6: 2D game
This week, Mr. Razif introduced us to the Fig. 6.0 eBook on 2D game art, animation, and lighting in Unity, which I believe will be very helpful for our project. This time, we are making a 2D game instead of a 3D game. In this context, Universal 2D offers more modern features and performance optimizations compared to the 2D (Built-in Render) pipeline, such as the ability to handle lighting effects.
Fig. 6.0 2D game art, animation, and lighting in Unity - PDF
In addition, to implement camera tracking of the player, there is no need to write a custom script. Instead, you can simply go to Package Manager > Unity Registry > Cinemachine > Install, and then add a Virtual Camera in the hierarchy to achieve the camera tracking effect. This also allows you to adjust the screen size. Also, I have learned how to create a door that opens when the player gets close, and how to collect coins to increase the coin count.
Fig 6.1 2D exercise 1.0
Week 9
Fig. 7.0 2D Exercise 2.0
Week 11
Fig. 8.0 2D Game with HP Bar
Comments
Post a Comment