Building The Last Ritual: a UE5 horror game on Linux

The Last Ritual is a first-person horror game I built alone in Unreal Engine 5, written in C++ on Linux. You play Arjun, a ghost hunter with his grandfather's notebook, inside a Rajasthani haveli that has been closed since 1987. Each night a different spirit haunts the house: find its signs, work out which ghost it is, and perform the right ritual before it takes you.
When GTA 6 launched, everyone was chasing it. Meanwhile, I built my own game. The code is open source (MIT), and Night 1 is playable.
- Code: github.com/lokendra-builds/TheLastRitual
- Case study: The Last Ritual
What's in Night 1?
- A free-roam haveli: a courtyard with a well, a pillared veranda and 10 rooms
- The Mirror Woman: clues like mirrors with no reflection, combed hair, a diary page and UV handprints, plus red herrings
- Ghost Guide: the clues you have found and how well each of the 5 ghosts matches them
- Hunts: after 6 seconds of torch flicker and silence, she appears and chases you. Run, hide in an almirah, or shoot her with the Gun Torch (5 hits drive her off for that hunt)
- Rituals: cover every mirror but one and trap her in the last. A wrong ritual costs a life
- Gadgets: Torch, Gun Torch, UV Torch, Thermometer and EMF Meter, bought in a shop
- Help on screen: a compass, room names, a glowing path to the next clue, a red arrow showing where the ghost is coming from, and a map
How is it built?
| Part | How |
|---|---|
| Engine | Unreal Engine 5.8.4 |
| Code | C++20: player, gadgets, ghost, hunts, night rules, HUD, sound and recording |
| Platform | Linux (Ubuntu 24.04), Vulkan renderer with Lumen lighting |
| Level | Generated by an editor Python script, Scripts/build_haveli.py |
| Art | CC0 textures and props from Poly Haven |
| Sound | No audio files: everything is synthesised in code |
Sound with no audio files
Every sound in the game is generated in code: footsteps, doors, a heartbeat, whispers, and the score, a tanpura and bansuri piece in raag Bhairav. Nothing is recorded or licensed.
Built to be tested
Launch flags let scripts play the game by themselves: fast hunts, auto-hide, auto-fight, auto-ritual, timed screenshots from set camera angles, and auto-recording. F9 records gameplay with sound on Linux, using ffmpeg.
Controls
| Key | Action |
|---|---|
| W A S D / mouse | Move / look |
| Shift / C | Run / crouch |
| F | Torch on or off |
| E | Interact, hide in an almirah |
| Left click | Use the gadget (fire the Gun Torch) |
| B / Tab / M | Shop / Ghost Guide / map |
How do you run it?
You need Unreal Engine 5.8.4 for Linux, an NVIDIA or AMD GPU with Vulkan, about 150 GB of free disk, Git LFS for the binary assets, and ffmpeg for recording.
git lfs install && git lfs pull # binary assets
./start.sh # check the PC, build the C++, open the editor
./start.sh game # play in a window without the editor
The first launch compiles shaders and takes a while.
The honest part
- It is one night, not a full game yet: Night 1 is playable
- The setup needs Unreal Engine 5.8.4 on Linux and about 150 GB of disk
- One developer, one machine. It is not GTA scale, and it isn't meant to be
FAQ
What engine is The Last Ritual made in? Unreal Engine 5.8.4, with the game code in C++.
Is The Last Ritual open source? Yes. The code and project files are MIT-licensed, and the Poly Haven art is CC0.
Which platform does it run on? It is built and tested on Linux (Ubuntu 24.04, Vulkan), and the repo's instructions are for Linux.
Where is it set? In an abandoned Rajasthani haveli, closed since 1987.
More of my projects: GitHub.
Sources
- The Last Ritual on GitHub (README, MIT)
- Gameplay video on YouTube
- Unreal Engine
- Poly Haven, CC0 art
