DEV Community

Himanshu Kumar
Himanshu Kumar Subscriber

Posted on

SOLSTICE — The Longest Day: a platformer where light is your only resource

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

What I Built

SOLSTICE — The Longest Day is a short, atmospheric platformer built around one idea: your light is your only resource.

It's the eve of the June solstice — the year's hinge between the longest day and the longest night — and the sun is failing. You play a small wanderer carrying the last ember of daylight. That glow does three jobs at once:

  • It lets you see. The world is dark; you move inside a soft pool of light that shrinks as it drains.
  • It's your lifeline. Shadow drains it faster — let it gutter out and you're nearly blind.
  • It's your tool. Spend it in a Sunburst to bloom pale, ghostly platforms into something solid, light distant beacons, and push back the dark.

You carry that light across four hand-built levels — Dusk → Twilight → Deep Night → The Turning — as the darkness deepens, until you reach the altar and rekindle the dawn.

My goal & the theme: the solstice is the exact instant light and dark trade places, so I wanted light to be something you physically negotiate the whole game rather than just a backdrop. Spend too much and you're stranded in the dark; hoard it and the path stays shut. The level arc traces the day itself — a descent into the longest night, a turning point, and a climb into a dawn that floods the screen with gold.

Play it in your browser (desktop & mobile): https://hyperagent.com/s/A_Xul17aTbCIAsAcvG8A-w

Code

The entire game is a single, self-contained index.html — HTML5 Canvas 2D + vanilla JavaScript, no engine, no libraries, no build step. One file you can read top to bottom.

SOLSTICE — The Longest Day

A short, atmospheric platformer where your light is your only resource. Built for the DEV June Solstice Game Jam.

▶ Play: https://hyperagent.com/s/A_Xul17aTbCIAsAcvG8A-w

On the eve of the solstice the sun is failing. Carry the last ember of daylight across four levels — Dusk → Twilight → Deep Night → The Turning — and rekindle the dawn. Your light lets you see, slowly drains, and is spent in a Sunburst to bloom platforms, light beacons, and push back the dark.

Controls

  • Move: ← → or A D
  • Jump: Space or W
  • Sunburst: J or Shift
  • Pause: P · Restart: R · Mute: M
  • Mobile: on-screen buttons — play in landscape

Tech

One self-contained index.html — HTML5 Canvas 2D + vanilla JavaScript. No engine, no libraries, no build step. Real-time 2D lighting via canvas compositing, fixed-timestep platformer physics (coyote time, jump buffering, variable jump height)…

How I Built It

Lighting is the heart of it. Each frame I draw the world normally, then build a separate darkness layer: fill it near-black, then punch holes in it with radial gradients at every light source (you, motes, beacons, lit platforms) using globalCompositeOperation = 'destination-out'. Composited over the scene, that gives the soft pool-of-light look; a second additive pass paints warm bloom back in. Platforms that are only solid when lit simply test, each frame, whether their center falls inside a light radius — that one check is the whole core mechanic.

Game feel got real attention: a fixed-timestep loop, coyote time, jump buffering, variable jump height, squash-and-stretch on the character, a little screen shake on landings and Sunbursts, and an eased camera. Small touches, but they're the difference between a canvas platformer feeling crisp vs. stiff.

Audio is fully synthesized with the Web Audio API — no sound files. A warm, consonant sine pad drones under everything, with gentle chimes for motes and a soft whoosh for the Sunburst.

It's responsive & mobile-first: the canvas adapts its aspect ratio to fill any screen, and the touch controls are true multi-touch so you can move and jump at the same moment (with touch-action: none so the browser doesn't hijack the second finger as a zoom).

A few things I wrestled with: keeping a draining-resource game fair (generous minimum light, forgiving beacon checkpoints); a collision bug where a rising platform briefly overlapped the player's feet and flung them sideways; and tuning the dawn so it reads as a warm sunrise payoff instead of a blinding flash.

Thanks for playing, and happy solstice. ☀️

Top comments (1)

Collapse
 
klaudiagrz profile image
Klaudia Grzondziel

Such a lovely idea! 💛 The navigation is easy, and the layout is very atmospheric.
I had a nice time playing, thanks! :)