top of page

Haunted Ember

Introduction

Haunted Ember is a 2D mobile platformer where players use light-based mechanics to explore a haunted castle, avoid ghosts, and solve puzzles to reach the end of each level.

Platform:           

Engine:   
Duration:          
Team Size:         
Role:           

PC, Android
Unity
2024.9 - 2024.11
5
All Coding Work

Movement Control

I implemented character movement and animation control using a state machine. For each character state, I utilized Scriptable Objects to manage and adjust its parameters. The Unity Input System was used to capture inputs from keyboard, gamepad, and touchscreen.

For mobile platforms, I developed two solutions for input handling: button controls and virtual joystick.

The joystick will appear at the point where the player first touches the screen. The player can then move the joystick in any direction. The system calculates the movement direction and speed based on the joystick’s position, allowing the player to move left or right with appropriate responsiveness.

ezgif-5bbdf43f452ce8.gif
ezgif-2bd0cdf3dc6a34.gif
Screenshot 2024-12-15 215842.png
Screenshot 2024-12-15 215749.png

Light Mechanic System

The light masking mechanism is the core of this game. In brief, the requirement is that a circular light surrounding the player causes special tiles it covers to disappear, with the light radius gradually shrinking over time.

 

I achieved this by combining masks and 2D lighting. The light is divided into three stages: large, medium, and small, each using different mask sizes and lighting with varying brightness and colors. At the same time, I implemented a system to dynamically check which special tiles are within the corresponding light radius and update their states accordingly.

ezgif-5bbdf43f452ce8.gif
lm1.gif
ezgif-5bbdf43f452ce8.gif
lm2.gif
ezgif-5bbdf43f452ce8.gif
lm3.gif

Ghost AI

The player will get hurt and respawn at the last checkpoint when touching it.The states of the ghost are illustrated in the diagram below.

HZ_TGP1_HauntedEmber_Screenshot_03.png
HauntedEmberAI.png
  • GitHub
  • Linkedin
bottom of page