3 ms·
Sovereign Engine – A hackable JavaScript game engine with live code editing
- modulardevtools 1y agoHi HN! I've built something different from the usual game engine and would love your thoughts. Sovereign Engine: Project Flux https://modulardev-tools.github.io/Project-Flux/ https://modulardev-tools.github.io/Project-Flux/ This is a fully functional game engine where every system is modifiable at runtime in the browser. The core philosophy challenges software as a black box – all code is exposed and hackable. Key Technical Differentiators: Live Dependency Injection – Core systems (weapons, rules, physics) are dependency-injected and hot-swappable No Build Step – Edit code → Apply → See changes instantly while playing Deterministic Engine – Seeded RNG for reproducible gameplay/mod testing Public Domain – No licensing restrictions, truly yours to modify Try the Live Modding: Play the game normally (wave-based shooter with boss fights) Open any mod panel ( WEAPON, RULES, PLAYER) Load a preset or write your own code Click Apply – changes take effect immediately Example – Modify Weapon Behavior: javascript // In the WEAPON panel – create a 3-shot burst function shoot(player, target, engine) { for (let i = 0; i < 3; i++) { setTimeout(() => { engine.projectiles.push({ x: player.x, y: player.y, vx: Math.cos(angle) * 450, vy: Math.sin(angle) * 450, size: 3, color: '#ff55ff', life: 1.5 }); }, i * 80); } } Architecture Highlights: Clean separation between engine core and mod systems Mods run in same context as engine (full API access) localStorage persistence for user creations All audio generated procedurally Why I Built This: Most game engines treat their internals as black boxes. I wanted to create something where the educational value is inherent – you learn game development by modifying a working game, seeing immediate results. The engine demonstrates "sovereign software" principles: transparent, modifiable, and truly owned by users. No permissions, no gatekeepers, just creative freedom. I'm particularly interested in HN's thoughts on: The technical architecture choices Potential applications beyond gaming The "sovereign software" philosophy Ways to improve the modding API Live Demo: https://modulardev-tools.github.io/Project-Flux/ https://modulardev-tools.github.io/Project-Flux/ GitHub: https://github.com/JamesTheGiblet/Project-Flux-MVP-Ready https://github.com/JamesTheGiblet/Project-Flux-MVP-Ready Looking forward to your feedback and seeing what mods you create!