Skip to content

CodeGallantX/the-last-light

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Last Light

A simple and atmospheric browser-based game where you play as a spark of light navigating a dark and dangerous world.

Story

You are a tiny spark adrift in endless darkness. Other trapped souls flicker faintly in the void, waiting to be freed. But every soul you ignite takes a piece of your own light, leaving you more vulnerable to the shadows. Will you sacrifice yourself to save others, or will you seek your own escape?

How to Play

Controls

  • Desktop:
    • SPACE: Ignite - Ignites the nearest soul.
    • ArrowUp: Jump - A quick burst of upward movement.
  • Mobile:
    • Right Button (Flame Icon): Ignite.
    • Left Button (Arrow Icon): Jump.

Objective

There are two ways to win:

  1. Salvation: Collect 15 souls to ignite the final beacon and bring light to the darkness.
  2. Escape: Survive the treacherous journey long enough to find a way out of the void.

The Challenge

You must constantly balance risk and reward. Your light is always fading, and the darkness is filled with obstacles.

Game Mechanics

The Light

Your light is your life. It constantly dims over time. If it fades completely, you are consumed by the darkness.

The Sacrifice

  • Collecting Souls: To achieve the "Salvation" victory, you must collect souls. However, each soul you carry makes your light decay faster. This is the core sacrifice of the game.
  • Ignoring Souls: You can choose to avoid souls to make your light last longer, potentially allowing you to survive long enough to "Escape". But without collecting souls, you can never achieve Salvation.

Obstacles

The darkness is not empty. Solid obstacles will appear in your path. Colliding with one will extinguish your light immediately.

Endings

The game has three possible outcomes:

  • Salvation Win: Collect 15 souls.
  • Escape Win: Survive for 12,000 distance units.
  • Game Over: Your light radius shrinks to its minimum, or you collide with an obstacle.

Getting Started

  1. Clone this repository.
  2. Open the index.html file in your web browser.

Technical Details

  • Rendering: The game is rendered using the HTML5 Canvas API.
  • Styling: The UI and modals are styled with Tailwind CSS.
  • Audio: All sound effects are procedurally generated in real-time using the Web Audio API.

About

DayDream Hackathon

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published