Skip to content
Projects

Blacklight

A first-person horror game built from scratch on three.js, with no game engine and every animation written by hand.

Try it

Blacklight, screenshot 1
Blacklight, screenshot 2
Blacklight, screenshot 3

Details

Period
2026
Status
Completed
Code
Private repository
Stack
three.js, JavaScript, tween.js

Case study

The game

You wake up in the dark wards of a decommissioned hospital with a failing flashlight and a revolver that can stagger, but not kill, the figure that hunts you. To escape you need four rings hidden across nine rooms, each earned a different way: a keypad code, a locked room, a crate, a blood bag. The flashlight lets you see, but pointing it at the figure draws it to you, so you keep trading visibility for safety.

How it’s built

  • No engine. Plain three.js with ES modules. Every animation, from the creature’s walk cycle to its lunge, is written by hand in JavaScript; no animation clips are imported.
  • Generated level. The whole hospital comes from a small text grid. Walls, doorways, colliders, per-room lighting and the navigation graph are all derived from it.
  • The figure. A hierarchical rig of nested joints. The same hand-written animation drives both a primitive rig and the bones of an imported humanoid mesh. Its AI wanders, chases and lunges, with pathfinding over the navigation graph.
  • Rendering. Real-time flashlight shadows, fog, and PBR textures with colour, normal and roughness maps on every surface. Imported props are grounded and oriented automatically, with textures re-encoded to 512 px to keep the frame rate up.
  • Three difficulty levels change the figure’s speed, the number of figures, battery drain and ammunition.

Final project for Interactive Graphics, Sapienza University of Rome.