I built a 3D open-world mythology game in the browser with just Three.js
I'm a software developer, and for a while I'd been curious how far a browser could go with nothing but Three.js and the Web Audio API. So I built a game to find out. Devayan: The Ten Drops of Amrita is a free, open-sour
I'm a software developer, and for a while I'd been curious how far a browser could go with nothing but Three.js and the Web Audio API. So I built a game to find out.
Devayan: The Ten Drops of Amrita is a free, open-source 3D action-exploration game inspired by Indian mythology. You free ten sacred sanctums on foot, awaken a flying Vimana (sky-chariot), and fly from the ground all the way to orbit to face an eclipse-lord.
🎮 Play it: GAME LINK
💻 Source (MIT): REPO LINK
The rules I set for myself
- No game engine. Just Three.js.
- No build step. Plain ES modules served as static files.
- No external assets. Every model is built from geometry in code, and every sound is synthesized.
These limits kept the project small and made it deploy-anywhere. It's a handful of JS files and can be hosted on any static host.
Zero build tools
Browsers can load ES modules natively, and an import map lets import * as THREE from 'three' work without a bundler:
<script type="importmap">
{ "imports": { "three": "./libs/three.module.js" } }
</script>
<script type="module" src="./js/main.js"></script>
The one catch is that modules need HTTP, so python3 -m http.server is the whole dev setup.
Models without a modeling tool
Characters, temples, boats and the Vimana are all built from basic geometries combined in code. A low-poly, flat-shaded style hides the lack of detail and keeps a large world light enough for the browser. A big part of the charm comes from lighting and color choices, not mesh complexity.
Music without audio files
I wanted the world to feel Indian, which meant a tanpura drone and bansuri flute melodies, plus temple chimes and combat effects. Instead of shipping audio files, everything is generated in real time with the Web Audio API. That keeps the download tiny and lets the music be generated live. It was the most fun part of the project.
Flying from the ground into space
I didn't want a loading screen between the world and orbit. The sky blends from day into space as you climb, using a blend factor based on altitude:
const spaceBlend = THREE.MathUtils.clamp(
(vehicle.position.y - 28) / (spaceAltitude - 28), 0, 1
);
That one value drives the sky color, fog and the switch into the orbital combat arena, so the transition feels continuous.
Game design wrapped around a story
The ten sanctums, three unlockable "astras" and the orbital boss all come from one simple legend: ten drops of divine nectar, an eclipse-demon who wants them, and you in between. Having a story gave me an answer every time I wasn't sure what to build next. Progress is saved in localStorage, with an atlas for fast travel between freed sanctums.
What I'd do next
There's plenty to improve, and I'd love your thoughts:
- Bridges or clearer paths early on, since water can block new players
- A more convincing space environment when you reach orbit
- A second phase for the boss fight
- Performance testing across low-end laptops and phones
Try it and tell me what you think
The game is free, ad-free and open source. If you play it, I'd really like to hear about performance on your device and how the controls feel. And if you want to read the code, everything is in the repo.
Thanks for reading! 🙏
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.