Game Development - Task 3: Game Prototype
Lew Guo Ying / 0365721 / Bachelor of Design in Creative Media
Game Development
Task 3: Game Prototype
Index
Instructions
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:
-
Video walkthrough and presentation of the prototype.
-
Online reflective post in the E-portfolio to document development progress.
|
|
| Fig1.1 Task Contribution |
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
|
|
| 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 |
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 |
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 |
|
|
| Fig1.7 Parameter |
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:
-
If Sahira is grounded, she applies upward force using
jumpForce. -
If she is mid-air and hasn’t exceeded
maxJumps, the script allows a mid-air dash by calling theDashCoroutine().
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.
|
|
| 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 |
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
enemylayer and have anEnemyControllerscript that contains theTakeDamagemethod. -
Sahira uses the
playerlayer 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 |
|
|
| Fig1.13 Hurt |
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.
|
|
| Fig1.14 Collect Soul |
|
|
|
Fig1.15 Absorb point |
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 |
-
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.,FoxSoulData,MummySoulData), ensuring that collected souls can later be used for crafting purposes.
|
|
| Fig1.17 Soul and Itemdata |
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 |
|
|
| Fig1.20 SecondPanel |
|
|
| Fig1.21 ThridPanel |
|
|
| Fig1.22 Script |
-
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 |
|
|
|
Fig1.24 Inspoector |
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 |
-
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:
Feedback
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
Observation
Findings
Comments
Post a Comment