Game Development - Task 3: Game Prototype

11.06.2025 - 25.06.2025 (Week 8 - Week 10)
Lew Guo Ying / 0365721 / Bachelor of Design in Creative Media
Game Development
Task 3: Game Prototype

Index

    1.1 Progression
    1.2 Submission

Instructions

MIB for Game Development

Requirement:

For Task 3, students are required to create a prototype of their game using Unity Game Development software. The prototype does not need to include final art assets; the use of grey boxing (placeholder graphics) is allowed. The main focus is to quickly test the game mechanics and resolve any technical difficulties during development. The goal is to deliver the Minimum Viable Product (MVP) of the game.

The prototype must include:

  • Coding movements and actions of the main character.

  • Coding obstacles and enemies’ interactions to test gameplay flow.

  • Coding game levels with basic logic implemented.

Submission Requirements:

  1. Video walkthrough and presentation of the prototype.

  2. Online reflective post in the E-portfolio to document development progress.

Learning Goal:
This task aims to enhance technical and digital media competencies by encouraging students to generate and communicate game design concepts effectively through manual and digital skills.


Progression:
Fig1.1 Task Contribution 
For Task 3, our team worked collaboratively to develop the prototype of Sands of the Stolen Heart. Each of us contributed to different areas of development, focusing on our strengths while supporting one another when challenges arose. This collaboration allowed us to implement various core mechanics and build a playable MVP version of our game.

Ho Winnie took charge of the enemy-related systems. She was responsible for preparing the spritesheets for all enemy characters, ensuring smooth animation and visual consistency. Beyond graphics, she implemented the environmental tiling style, which helped define the overall layout and visual flow of the game world. On the programming side, she worked extensively on enemy movements, coding the behavior for the Undead Cat, Sand Fox, and Skeletal Monster. Additionally, she developed the enemy combat logic, enabling enemies to attack both the player and the minions. Her work also included enemy death mechanics, ensuring that enemies interacted correctly with the game’s systems when defeated.

My contribution centered around Sahira’s mechanics and the crafting system. I prepared the spritesheets for Sahira and implemented all her core movements, including jumping, idle states, dashing, attacking, walking, and soul collection. Beyond character control, I focused heavily on coding the entire crafting system mechanics, one of the game’s most unique features. This included ensuring that players could collect enemy corpses and use them to create various minions. To support this system, I also developed the soul collection mechanics and the logic behind spawning minions, making sure they functioned strategically during gameplay. This part of the prototype was particularly challenging but ultimately rewarding, as it brought one of the key gameplay elements to life.

Chong Hui Yi was in charge of the game level setup. She handled the environment design and tile arrangement, ensuring the levels were playable and visually coherent even during the prototype stage. She also implemented collision and tile boundaries, preventing the player from moving outside the intended play areas. Furthermore, she added parallax background effects, which gave the game’s environment a sense of depth. In terms of mechanics, she worked on the potion and scarab pickup systems, coding the interactions that allowed Sahira to collect items and increase her health bar after consuming potions. She also ensured that all items had proper border collision detection, making the pickup system smooth and reliable.

Through this division of work, we managed to integrate multiple complex systems into a functional prototype. Each of us contributed our specialized skills—whether in character mechanics, enemy behavior, or level design—while constantly reviewing and refining each other’s work. The result was a prototype that effectively showcased our game’s core loop and mechanics, providing a strong foundation for the next stages of development.


Sahira Mechanics

1. Sprite Sheet
Fig1.2 Sahira Sprite sheet

One of my main responsibilities was to develop all the mechanics related to Sahira, our main character. To make her more dynamic and engaging to control, simple walking animations were not enough. Therefore, I implemented a complete movement system that included attacking, jumping, and dashing, creating a smooth and responsive gameplay experience.

Additionally, I worked on the crafting animation, which is essential because the crafting system is one of our game’s core mechanics. This animation needed to clearly convey the process of summoning and combining materials into new minions, making it both visually satisfying and functionally important.

The animations, as shown in the images, were created using After Effects (AE). Each animation lasts around five seconds, and when exported as sprite sheets at 30 frames per second, this results in around 150 frames per action. This explains why the sprite sheets appear complex and dense. However, when integrating them into Unity, optimization was crucial. For actions like attacking, I had to trim unnecessary frames, ensuring that the animations remained fluid while also making attacks trigger accurately without any input delay.

This process required a lot of iteration and testing, but ultimately it allowed Sahira to feel like a responsive and polished character—one that serves as the heart of the player’s experience.


2. Sahira Movement Actions

Fig1.3 Exporation

Creating a seamless animation system for Sahira was one of the most technically and artistically demanding parts of my work. The process began in After Effects (AE), where I carefully crafted each animation—walking, attacking, jumping, dashing, getting hurt, and composing (crafting minions). Each action had to be visually distinct while still feeling cohesive as part of the same character. To ensure smooth playback, I worked with 30 frames per second (fps) and created 5-second-long sequences, resulting in over 150 frames per animation. This level of detail was necessary to make Sahira’s movements fluid, but it also meant handling a large number of assets efficiently.

After polishing the animations, I exported them as PNG Sequences with RGB + Alpha enabled. This setting was crucial, as it preserved transparency and avoided unwanted background colors when integrating them into Unity. I organized all outputs into clearly labeled folders, separating each animation type (Idle, Attack, Jump, Dash, Hit, Compose, Walk). This step saved a lot of time during the later stages of development when importing and editing animations.


Fig1.4 Sprite Setting
Once in Unity, I imported the sequences into a dedicated Player folder to keep the project clean and maintainable. Each sprite sequence required precise configuration to function correctly in the game. The Texture Type was set to Sprite (2D and UI), allowing Unity to treat each frame as a 2D asset. For alignment, the Pivot was set to Bottom, ensuring Sahira stayed grounded during transitions. I used Single mode for sprites to prevent drifting, and under Advanced Settings, I ticked Alpha Is Transparency, eliminating any black background artifacts. Compression was either disabled or set to high quality to preserve crisp visuals.

With the sprites prepared, I dragged the sequences into the Hierarchy, which automatically generated animation clips (anim). At this stage, looping behavior was adjusted based on the type of action—Idle and Walk were set to loop, while Attack, Dash, Hit, and Compose were configured to play once, aligning with gameplay logic.


Fig1.5 Animation
The final and most important step was setting up the Animator Controller. I created a single controller named PlayerSahira to manage all animations. Within Unity’s Animator Window, I built a state machine connecting every animation state with logical transitions, controlled by parameters such as isWalking, isJumping, isDashing, and Attack. This design allowed me to centralize control over Sahira’s animation system, ensuring smooth and responsive state changes during gameplay.

This entire workflow—from AE to Unity—required a balance between artistic precision and technical optimization. Each animation was fine-tuned to maintain visual appeal while also keeping the system lightweight for gameplay performance. By the end, Sahira not only looked lively but also felt responsive to player input, which is critical for delivering a satisfying game experience.


Fig1.6 Dash, walk, jump

Among all of Sahira’s movement mechanics, dash, walk, and jump form the foundation of her mobility system. Although they seem basic, their implementation required careful tuning in both Animator settings and scripting to ensure the gameplay feels responsive and natural.


Fig1.7 Parameter

In the Animator, parameters such as isWalking, isJumping, and isDashing are critical. They define when and how animations transition between states. For example, dash can only be executed when Sahira is already airborne, which means the transition has to be restricted by conditions (e.g., isJumping == true before isDashing is allowed). Similarly, both jump and dash are non-loop animations. This prevents repetitive triggering that could cause stutter or break the flow of the movement.

Fig1.8 Has exit time

A key setting here is Has Exit Time.

  • How it works: Has Exit Time ensures that an animation completes its current playback before transitioning to another state.

  • Why it’s necessary: Without it, the animation might be interrupted too early, resulting in snapping or inconsistent movement. For actions like attack, jump, or dash, this is crucial because the gameplay depends on the animation playing fully—allowing the hitbox, movement physics, and timing to align perfectly.

  • When to use it: It’s applied to single-trigger actions (e.g., attack or dash) where the animation must finish to preserve consistency. On the other hand, idle or walk do not rely on exit timing and can transition freely to other states.

The state machine was designed so that idle and walk can trigger transitions to jump, attack, or dash, while after any of these actions, the character always returns to idle. This creates a fluid cycle where the Animator clearly understands the current state, thanks to the parameters.


Fig1.9 Script

On the scripting side, I configured the controls so that jump is triggered by the Space key. The script checks two scenarios:

  1. If Sahira is grounded, she applies upward force using jumpForce.

  2. If she is mid-air and hasn’t exceeded maxJumps, the script allows a mid-air dash by calling the DashCoroutine().

To prevent input spam or unintended repeated actions, I implemented cooldowns between dashes. This timing adjustment ensures dashes feel powerful yet controlled, contributing to gameplay balance.

Finally, I added a small but impactful feature: collider shrinking during dash. When Sahira dashes, her collider temporarily reduces to a circular shape, enabling her to pass through narrow passages. This not only increases gameplay challenge but also enhances the dash’s tactical value, encouraging players to use it strategically.

Through this combination of precise Animator control, parameter-based state management, and finely tuned scripts, Sahira’s movement system became both responsive and engaging, giving players a satisfying sense of control.

2.1 Attack and Hurt
Fig1.10 Atk

The attack system is another critical component of Sahira’s gameplay. Its implementation may look similar to other actions, but it requires additional consideration, especially regarding layers, tags, and damage handling.

For the Animator, the attack animation uses the same parameter system as other movements. The condition Attack is triggered by Animator.SetTrigger("Attack"), ensuring that the animation plays correctly without looping. The transitions are carefully controlled so that the attack starts only when Sahira is not already attacking, preventing animation conflicts.


Fig1.11 Inspector
The script side involves a coroutine PerformAttack(). When the player presses the J key, the script first checks whether Sahira is already attacking by referencing the isAttacking flag. This prevents spamming attacks and ensures that the animation timing matches the gameplay. Upon triggering, the script plays the attack animation and uses Physics2D.OverlapCircleAll to detect any enemies within attackRange around the attackPoint. All detected enemies in this range receive damage via the .TakeDamage(1) method.

This system relies heavily on correct tag and layer configurations.

  • Enemies must belong to the enemy layer and have an EnemyController script that contains the TakeDamage method.

  • Sahira uses the player layer to avoid self-interaction and for other scripts to differentiate her from AI entities.

  • Boss enemies and minions have their own controllers (e.g., BossController) with similar damage handling.


Fig1.12 Atk
When enemies are damaged, I added an EnemyFlash script that makes them briefly flash red upon hit, giving players immediate visual feedback. This enhances combat clarity and makes hits more satisfying.


Fig1.13 Hurt

On the player side, damage handling is embedded directly within the player’s script. When Sahira takes damage, she flashes red for 0.1s and her health bar decreases accordingly. If health reaches zero, she respawns at the starting point, preserving gameplay flow without requiring a full reload.

Lastly, the soul collection mechanic ties into the attack system. After an enemy is defeated, their soul can be collected, which triggers an animation and adds resources to the crafting system. This seamless integration between combat, visual effects, and resource management is crucial to the game’s core loop, making every battle meaningful.


2.2 Collect Soul and Craft Minions

Fig1.14 Collect Soul
The Soul Collection mechanic is one of the most atmospheric and rewarding features of Sahira’s gameplay. This system not only enhances the combat feedback loop but also ties directly into the crafting mechanic, making every enemy encounter meaningful.


Fig1.15 Absorb point
The process begins with the enemy’s death. When an enemy is defeated, its script triggers the drop of a soul prefab. Each soul prefab is equipped with a Circle Collider 2D, making it interactable when the player approaches. Additionally, the soul object has its own SoulController script, which governs the absorption logic, movement, delay, and inventory integration.

To create an immersive experience, I implemented a Player Absorb Point—positioned at Sahira’s soul jar. When a soul is collected, it moves toward this absorb point, giving a strong visual effect of being sucked into the jar. This design not only looks satisfying but also reinforces the game’s theme of Sahira harnessing enemy souls.


Fig1.16 Script
In the SoulController script, several settings control the absorption process:

  • Absorb Range: Determines how close Sahira needs to be for the soul to start moving toward her.

  • Absorb Speed: Controls how fast the soul travels during the absorption animation.

  • Absorb Delay: Ensures the soul does not get instantly absorbed upon enemy death, allowing its animation to fully play out before collection.

  • Item Data Integration: Each soul is linked to an ItemData (e.g., FoxSoulDataMummySoulData), ensuring that collected souls can later be used for crafting purposes.


Fig1.17 Soul and Itemdata
The script checks if Sahira is within the absorption range and then moves the soul using Vector3.MoveTowards toward the absorb target. Once the soul reaches the absorb point, it plays an absorption sound and adds the soul to the inventory system. The prefab then deactivates, completing the process smoothly.

This mechanic is more than just a pick-up system; it adds tactical depth and visual storytelling to gameplay. The delayed absorption effect also prevents the soul from disappearing instantly, ensuring players can visually appreciate the reward. Furthermore, since each soul is stored as a unique item, it opens up future crafting possibilities, giving the player a reason to hunt and collect.


3. Crafting System


Fig1.18 Crafting

The crafting system I implemented is one of the most complex and core parts of our game. It integrates multiple mechanics—from collecting souls to crafting minions, and finally placing them strategically to assist the player. The entire workflow is carefully structured to ensure that the crafting process feels intuitive while adding a strategic layer to gameplay.


Fig1.19 Sprite
 
At the beginning, I set all UI textures (such as icons, cards, and buttons) to Sprite (2D and UI) with the pivot at the center. To maintain high visual quality, I disabled compression and increased the maximum size, ensuring every element remains crisp and clear.

Fig1.20 SecondPanel
The crafting process starts with a Crafting Button in the main UI. When clicked, it opens the Second Panel, which displays three categories of minions: Follower, Shield, and Turret. Each of these categories leads to a Third Panel, which shows specific craftable minions under that category. I designed this UI as a prefab to make future modifications easier. The red and green indicators under each soul icon show whether the player has enough materials (souls) to craft the desired minion. Once the craft button is clicked, the system deducts the required soul items, updates the inventory, and increases the count of the crafted minion. Players can then click the minion icon to deploy it in the world.


Fig1.21 ThridPanel
When deploying a minion, a ghost (transparent preview) appears first, allowing the player to see where it will be placed. This not only provides a visual cue but also improves control and positioning accuracy. Once confirmed, the minion spawns and begins its assigned function (attacking enemies, shielding the player, etc.).


Fig1.22 Script
On the scripting side, I created several scripts to manage this system:

  • CraftingPanelManager: Controls the opening and closing of panels and manages button interactions.

  • MinionPlacementManager: Handles the ghost preview before placement and finalizes minion deployment when the player confirms.

  • InventorySystem: Tracks all collected souls and consumed resources dynamically.

All these systems are interconnected, forming a seamless crafting experience. The crafting mechanic not only rewards players for defeating enemies but also allows them to strategically expand their abilities during gameplay.


Fig1.23 Minions
The Minion system is one of the core features that makes the gameplay more dynamic and strategic. Unlike simple AI allies, these minions are designed to interact with the environment, the player, and enemies in meaningful ways. There are three major types of minions:


Fig1.24 Inspoector
🐾 1. Followers – The Agile Companions

Followers act as loyal companions that patrol alongside the player.

  • Behavior: They wander around, automatically detect enemies, and engage in melee attacks when targets are within their detection range.

  • Teleportation Mechanic: If they stray too far from the player, they instantly teleport back, ensuring they are always ready to assist.

  • Collision Optimization: Minion-to-minion collisions are disabled, preventing them from blocking each other and allowing smooth coordinated attacks.

  • Combat Attributes: Followers have their own HP, attack cooldown, and detection range. The values are adjustable in the Inspector, making balancing straightforward.

This makes Followers excellent for continuous DPS and crowd control.


🛡️ 2. Shields – The Protective Barrier

Shields provide defensive utility, giving the player a tactical edge:

  • BoneWrapShield: Follows the player closely and absorbs incoming damage. It serves as a temporary guardian, effectively extending the player’s survivability.

  • SpikedClayWall: A stationary deployable shield that taunts enemies, forcing them to target it. Once destroyed, it explodes, dealing AoE damage to surrounding foes.

  • Taunt & Detonation Mechanics: By drawing enemy focus, this shield can create opportunities for counter-attacks. The explosive damage adds a layer of risk-reward gameplay.


🎯 3. Turrets – The Ranged Powerhouse

Turrets are immobile units that provide powerful ranged support:

  • Combat Role: They fire projectiles (e.g., KnifeProjectile or LoveProjectile) at enemies within their attack range.

  • Resource Management: Each turret has limited ammo and HP, adding a strategic element to their deployment.

  • Future Plans: A soul-based ammo refill system is planned, encouraging players to manage resources carefully.

Turrets are perfect for area control, letting players defend choke points or support aggressive pushes.


Fig1.25 Script
✨ Design & Gameplay Considerations
  • Sprite Flash Feedback: All minions use a SpriteFlash script to visually indicate when they take damage, providing instant player feedback.

  • Script Architecture: Each minion type is controlled by dedicated scripts (FollowerController, ShieldController, TurretController). This modular approach makes it easy to expand and tweak behaviors.

  • Animator Integration: Attack animations are non-looping, preventing desynchronization with damage frames, while transitions rely on parameters (e.g., isAttacking) to ensure correct state changes.

  • Balancing: Parameters like damage, HP, cooldown, and range are initially set to functional values, then fine-tuned through iterative testing to achieve a balanced gameplay experience.


Fig1.26 Projectiles

🎨 Player Experience

The Minion system encourages creative playstyles:

  • Players can mix and match minions for offensive (Followers), defensive (Shields), or control (Turrets) strategies.

  • Each minion’s death, attack, and flash effects create a lively battlefield atmosphere.

  • The mechanics also synergize with the Crafting System, allowing players to summon minions using collected souls, adding progression and satisfaction.


Submission:

Demo Video:


Presentation Slide By Winnie:


Feedback

Week 10:

This week, Dr. Mia gave positive feedback on the game prototype, praising its level of completeness and the unique mechanics it introduces. She particularly highlighted the soul-collecting and crafting system, which she found both innovative and well-integrated into the gameplay loop.

Her comments were encouraging, reaffirming that the time spent refining the core mechanics—from collecting souls to crafting minions—has paid off. These features not only make the game stand out but also create a rewarding progression system that players can look forward to.

Receiving such recognition at this stage is highly motivating. It reinforces the idea that the project is on the right track, and it pushes me to polish the existing systems even further while preparing for the next phase of development.



Reflections

Experience

During the development process, I experienced countless moments of trial and error. Implementing features like the soul collection and crafting system was exciting, but it also came with many technical hurdles. Bugs appeared frequently—sometimes from minor logic mistakes, other times from unexpected interactions between scripts. Each fix required careful debugging and occasionally complete rewrites to ensure stability. Despite the challenges, the process strengthened my problem-solving skills and gave me a deeper understanding of Unity’s workflow.

Observation

Throughout the project, I observed how collaboration and continuous testing played critical roles in moving forward. Discussions with peers helped identify problems faster, while sharing insights often led to better solutions. I also noticed that small design decisions, such as parameter tuning or animation transitions, could significantly influence the gameplay feel. These observations reminded me that both technical precision and creative iteration are essential to game development.

Findings

From this experience, I discovered that successful development relies on persistence and flexibility. No matter how well a system is planned, issues are inevitable, and being able to adapt quickly is key. I also learned the value of thorough testing—even small oversights can break gameplay. Most importantly, I found that team communication directly impacts the quality of the final product, as it ensures that every feature is aligned with the shared vision of the game.

Comments

Popular posts from this blog

TYPOGRAPHY Task 1: Exercise ( Type Expression and Text Formatting)

Application Design 2 - Task 1: Self- Evaluation and Reflection

Advanced Interactive Design - Final Task: Completed Thematic Interactive Website