top of page

Go Back

Cozy Dash

Project Info

Project Status

Project Type

Project Duration

Game Engine

Language(s)

Platform

Primary Role(s)

Team Size

Completed

Mobile Game Development Assignment

4 Weeks (November 2023 - December 2023)

Unity

C#

Android, WebGL

Designer, Gameplay Programmer, VHX Programmer, UI/UX Programmer

1

About

Cozy Dash is a 3D endless runner game that invites players to navigate a dynamically generated level while collecting coins and avoiding obstacles. Players use swipe controls for lane switching, jumping, and landing, with a scoring system to track total coins collected and distance traveled. To align with the game's cute aesthetic, I sourced charming assets from the Unity Asset Store that complement each other. I also implemented post-processing effects, ambient lighting adjustments, a customized skybox, and particle effects to enhance the overall visual appeal. This project marks my third game developed for Android and reflects six months of my learning journey with Unity.

Roles and Responsibilities

  • Project Setup and Source Control

  • Designed and Implemented Gameplay Mechanics, including:

    • Player controller for movements, animations

    • Swipe controller for lane switching, jumping and landing​

    • Random level generation with seasonal variations

    • Random object generation between obstacles and coins.

    • Score Manager for coins collected and distance travelled

  • Developed and integrated UI elements such as:​

    • Main menu and tutorial menu.​

    • In-game score display, pause menu, and game over menu.

  • Implemented Audio Systems for:​

    • Background music and sound effects for swipes and UI interactions.​

Player Controller

The player controller script mainly handles movement and animation. I decided to use Unity's Character Controller for player movement, as it simplified the implementation because complex physics was not needed in this project. Movement is controlled by a direction vector that accounts for player speed and gravity. To enhance visual experience, I integrated an Animator component to enable animations that reflect the player's movement state, with parameters set to control transitions between idle and running, and jumping animations based on player input and grounded status.

Swipe Controller

Swipe controller manages player movement, jumping and landing based on swipe gestures. It detects when a swipe starts and ends by tracking the mouse button positions. The DetectDirection function calculates the swipe distances in both X and Y directions. If the player is not jumping, it determines whether to move left or right based on the swipe direction. If the swipe is vertical, it triggers either a jump or a land action.

Random Object Generator

Random Object Generator dynamically spawns game objects at a specified intervals and positions. It randomly selects an object from an array and generates its spawn coordinates within defined limits on the X and Y axes. The script manages the spawning distance along the Z-axis and uses a coroutine to introduce delays between objects spawns.

Score Manager

Score Manager tracks and displays the player's coin collection and distance travelled in the game. I utilized Unity's PlayerPrefs to store and retrieve high scores for both coins and distance. In the Awake function, the script initializes itself as a singleton instance. The Start function retrieves previously saved high scores and updates the UI elements to reflect the current coin count and distance. In the Update function, the script continuosly updates the distance text based on the player's Z position and checks if a new high distance has been achieved, saving it if necessary. The CollectCoin function increments the coin count and updates the UI accordingly.

UI

  • Main Menu

  • Tutorial Screen

  • In-game HUD for:

    • Coins collected UI

    • Distance travelled UI

  • Pause Menu

  • Game Over Screen

bottom of page