GAME DEVELOPMENT // Final Task

 16.07.2024 - 07.08.2024  // Week 12 -Week 16

Lim Yi Xvan 0354552

Bachelor of Design in Creative Media 




Instruction



Final Game

Unity Development

After the designs and concept finalised, Unity's development phase started. Building the project and developing the basic framework set up the first phase. 

At first, the main goal was to establish the game's basic mechanics. This required putting in place mechanisms that allow player movement, jumping, and combating. Basic controls and character interactions were programmed using Unity's physics engine and animation systems. The player controls, enemy controller, traps, and environmental interactions were all handled by specially written C# scripts, which made sure that the essential gameplay components worked as planned.

A lot of study and exploration was done to make the game come to life. YouTube tutorials were very helpful during this stage. These tutorials offered detailed guidance on a range of game development topics, including how to make moving platforms, place checkpoints, and create scene transitions. I was able to build the functionality of the game by practicing with Unity's features and methods by following these tutorials.

For improving the basic mechanics and game systems, a tutorial level was first developed as part of the development process. The purpose of this tutorial was to introduce players with the fundamentals of gameplay and make sure they could interact with the game world properly. I progressively increased the game's difficulty by applying the same mechanics to later levels after the tutorial was refined and working.

Continuous evaluation and improvement were part of the process. New features were tested to make sure they worked well with the current systems as they were added. Problems like enhancing performance, gameplay balance, and debugging were tackled in order to improve the game's overall quality.

After the basic mechanics were established and the first level was completed, attention turned to developing more levels and improving the overall gameplay. This involved creating original environments, adding sophisticated enemy behaviours, and making sure the game's progression was both fun and difficult. The aim was to produce a polished and captivating experience that successfully communicated the game's vision and objectives through constant revision and refinement.
fig 1.1 - each level's hierarchy panel


Scripts

Akira (Players)
  • Movement (Horizontal input, speed, jumpforce, isOnGround, gravity)
  • Attack (Sword Slashes)
  • HP and Energy 
  • Animation Trigger
  • Respawn (Relocate at checkpoint, restores player health and reset animation)
  • Detect Radius for Enemy
Enemy 1 (Tutorial)
  • Attack (Kicking)
  • Damage to Player
  • Animation Trigger
  • Player Detection
Enemy 2 (Level 3 & Level 2)
  • Enemy's HP
  • Attack (Sword Slashes)
  • Damage to Player
  • Animation Trigger
  • Player Detection (Detect player's distance and perform attack anim)
Boss (Final Level)
  • Boss's HP
  • Attacks x2 (Martial Arts & Black Magic)
  • Damage to Player
  • Animation Trigger
  • Player Detection (Detect player's distance and perform attack anim)
Core
  • CameraController (Follows player)
  • DestroySelf (Destroys if enemy heath becomes 0)
  • Collect PowerUps Items (Destroys gameObject if collision tag is "Player")
  • SceneManager (Restarts game levels)
  • AudioManager (Controls bg music, sound effects and volumes)
Levels
  • Checkpoints (Relocate players on a specific point after they fall from the platforms)
  • Moving Platforms (Players can jump and move on it)
  • Scenes transitions animation (Smooth transitions from scenes to scenes)
  • Finish Points (Load scenes to the next level)
Collectable Items
  • Healing Potion: Animation & Increase HP value
  • Vital Juice: Animation & Increase energy value
Traps (Spiky Traps & Shurikens)
  • Damage to Players
  • Moving Traps (Pos A to Pos B)
UI
    • IntroScene (Intro's paragraphs in text box and load by animation)
    • NextSceneButton (OnButtonClick loads next scene by its name)
    • QuitGame (Quits the game and back to menu)
    • Pause Menu (Restart levels, quit game, and continue game)


    Scenes

    Start Menu
    • Game Title & animations
    • Start button

    fig 2.1 - start menu in game mode


    Intro scene
    • Cutscene
    • Accept challenge button
    • Skip button
    fig 2.2 - intro scene in game mode


    Tutorial
    • Starting point
    • Instructional Texts
    • Platforms & moving platforms
    • Enemy 1
    • Collectable items (Healing potion & Vital juice)
    • Traps: Spikes
    • NPC Master (interact)
    • Finish Point (proceed to level 2)
    fig 2.3 - tutorial level in scene


    Level 2
    • Starting point
    • Platforms & moving platforms
    • Enemy 1
    • Collectable items (Healing potion & Vital juice)
    • Checkpoints (if players passed by after and falls from the platforms will return to this point)
    • Traps: Spikes
    • NPC Master (interact)
    • Finish Point (proceed to level 2 & final battle)
    fig 2.4 - level 2 in scene


    Level 3
    • Starting point
    • Platforms & moving platforms (wooden)
    • Enemy 2 (higher hp & damage value)
    • Collectable items (Healing potion & Vital juice)
    • Checkpoints (if players passed by after and falls from the platforms will return to this point)
    • Traps: Spikes
    • NPC Master (interact)
    • Finish Point (proceed to final battle)
    fig 2.5 - level 3 in scene


    Final Boss Fight
    • Boss (with the highest hp value & damage value)
    • Traps: Shurikens
    • NPC Master (interact)
    • Finish Point (proceed to victory scene)
    fig 2.6 - final level in scene


    Victory Scene
    • Winning Headings & animations
    • Back to Menu button
    fig 2.7 - victory scene in game mode


    Game Over Scene
    • Losing Headings & animations
    • Restart button (proceed to tutorial level)
    fig 2.8 - game over scene in game mode


    I had a lot of challenges creating the gameplay, especially when it came to scripting the player's movements and attacks. Creating seamless animations required extreme caution because each frame had to be planned with precision to guarantee smooth motion. Due to these details, I made the decision to concentrate on just one kind of attack: sword slashes. This gave me the opportunity to refine the animation and make it more attractive and responsive. Moreover, I ran into issues when building moving platforms. At first, there were errors in the graphics and problems with gameplay when my player character would step on the platforms and scale incorrectly. Upon carrying out careful investigation, I was able to fix this issue and create seamless platform interactions.

    A particularly challenging issue I faced was related to the player's jumping mechanics, which were affected by gravity after scenes were reloaded. This problem persisted for 1 week, during which I struggled to find a solution. Ultimately, I reached out to my dearest lecturer for help, who provided invaluable guidance that enabled me to resolve the issue and ensure consistent jumping behavior across scenes.

    Since I'm not a gamer, I had issues coming up with ideas for the boss fight at the end. I was at a loss at first on how to make the level enjoyable as well as challenging. But in the end, I came up with a plan where the boss would start a second attack type after its health fell below a particular level. As a result, the battle became more lively and players needed to adjust their strategies. I added moving traps into the final boss area to increase the difficulty and excitement level, giving players a more interesting and demanding experience.


    Audios

    For the background music used throughout the game, from the start menu to Level 3, I chose ambient sounds combined with traditional Japanese koto and shakuhachi melodies. This combination strengthens the player's sense of participation and cultural richness in the ancient Japanese setting.

    The background music suddenly changes to fast-paced, high-energy music with rapid drumbeats and dramatic rises during the final boss battle. The goal of this alteration is to increase players' sense of intensity and anxiety in order to better represent the significant stakes and heart-pounding action of the finale.

    Terrifying ambient music with creepy sounds can be heard in the Game Over scene. The idea is to create a frightening environment that highlights how serious the player's failure is. The player is made to feel the weight of their defeat and is encouraged to try again by the strange sounds, which increase the sense of loss and approaching doom.

    On the other hand, melodies that are peaceful and victorious are played by traditional instruments in the Victory scene. With this background music, the player's journey comes to a satisfying end as it celebrates their accomplishment and gives them a sense of completion.

    The background music reverts to ambient sounds mixed with traditional Japanese koto and shakuhachi melodies when players click the buttons that take them back to the start menu. This smooth transition returns the player to the comfortable and peaceful starting point, prepared to resume their adventure, and maintains the unity of the game's audio experience.

    Different sound effects are also used throughout the game to enhance the player's experience:
    • Player movements such as jumping and attacking (sword slashes) have distinct sound effects, adding realism and immersion.
    • When players collect collectible items, a sound effect plays to indicate the successful collection.
    • Hitting traps triggers a knife hurt sound effect, cautioning players that they have been harmed.
    • Interactions with the master feature a flipping paper sound effect, adding to the narrative and atmosphere.
    • Falling or repositioning at checkpoints is accompanied by a landing sound effect.
    • Reaching the finish point triggers a sound effect for scene transitions, signaling the end of a level.
    • Enemies have kicking sound effects when hit by the player, emphasizing the impact.
    • The final boss uses two types of sound effects: knife slashes for martial arts attacks and spell sound effects for black magic attacks.
    The volume of the background music is lowered when sound effects are triggered, ensuring that these audio cues are clear and impactful.

    fig 3.1 - bgm and sound effects used


    Uploading and Publishing

    Initially, I attempted to upload my Unity WebGL build to Netlify, but encountered an issue. The upload failed because I used the Brotli compression format for my WebGL build. To resolve this, I went back to Unity, changed the compression format to "Disabled," and rebuilt the project.

    Once the build was successfully created without compression, I proceeded to upload it to Netlify. The upload was successful this time, and I was able to access the game through the provided Netlify link. However, I noticed that the canvas size did not match the aspect ratio of my laptop screen, leading to a distorted game view.

    To fix this issue, I returned to Unity and adjusted the canvas size settings to ensure the aspect ratio matched my laptop screen. After making these adjustments, I rebuilt the project and uploaded the updated WebGL folder to Netlify again.

    Finally, I tested the game on the Netlify link, and everything worked perfectly. The canvas size was correct, and the game displayed as intended, ready for players to enjoy. God bless me, finally I'm done with this whole thing omggg!!! time for a good sleep after this blog ends...

    fig 4.1 - my shadow of the shogun in UnityPlay

    This gameplay literally just took away my sleeps. Shadow of the shogun is now published and now I'm ready to make the shadow of my eyebag fixed.🥰


    Final Submission
    Finalized Game Design Document: 



    GamePlay Walkthrough Video: 



    GamePlay Video Presentation: 




    Reflection

    Starting this journey of game development has been illuminating and beneficial. It started with producing and expanding game concepts while striking a balance between functioning and creativity. The idea of a ninja traveling to restore peace by defeating an evil boss within a temple environment surfaced, offering a rich context for gameplay elements and story progression. Setting up and confirming the game concept required the creation of the design document. It acted as a development process blueprint, outlining every detail. The vision and scope of the game were made clearer during this phase, which called for careful planning and progressive revisions. Making the switch to design required creating visual elements. Sprite design was a complex process that called for artistic talent and careful attention to detail. The use of gradient colors in the art style's silhouettes produced a symbolic and visually catching impact.

    After designs were finalized, Unity development got taking place. Scripting basic gameplay elements like player movement, attacks, and animations was part of this phase. Online resources and YouTube tutorials were very helpful. It was possible to test and improve mechanics before carrying out them in other levels by starting with a tutorial level. Scripting smooth animations and figuring out scaling problems with moving platforms were challenges. Luckily, my lecturer has helped me with an ongoing problem with jumping mechanics that was impacted by gravity after scene reloads. The solution of these problems showed the value of cooperation and help-seeking.

    The project produced a useful and enjoyable game. Important takeaways include the need for a comprehensive design document to ensure consistency and integration, the significance of overcoming development obstacles with persistence and assistance, and the importance of continuous improvement to guarantee a polished gameplay experience. The importance of learning and teamwork was highlighted by the improvement of development outcomes through the use of online resources and guidance.

    To sum up, the journey has given me insightful knowledge about game development and strengthened the value of imagination, preparation, and perseverance. It produced a living game and gave me valuable skills I can use on other projects in the future. (hopefully no more games pls i'm tired and i need to sleep now...








    Comments

    Popular Posts