Building EchoQuest — A Browser-Based Action RPG
People keep asking me the same question: “Why build an RPG in the browser?” It’s a fair question. Most indie RPGs ship as native downloads. But I had a specific vision for EchoQuest, and the browser turned out to be the best way to make it real. Here’s how it came together — the tech, the tradeoffs, and the things I wish someone had told me before I started.
Why the Browser?
The short answer: accessibility. I wanted a game you could play the moment you heard about it. No download, no installer, no Steam client — just click a link and you’re in. Your friend sends you a URL on Discord, you open it on your phone during lunch, and ten minutes later you’re fighting goblins. That’s powerful. A browser-based RPG removes every barrier between “I’m curious” and “I’m playing.”
There’s a practical side too. A browser RPG runs on anything with a web browser — your gaming desktop, your work laptop, your phone, a Chromebook, even a tablet. One codebase, every platform. For a solo developer, that matters more than anything.
The Tech Stack
EchoQuest is built on Phaser 3.70 for the client-side game engine. Phaser handles rendering, input, animation, tilemaps, and the game loop. It’s a mature HTML5 game framework with a huge community, solid documentation, and it performs well on both desktop and mobile browsers.
The backend runs on Node.js with Express, talking to a PostgreSQL database for persistent game state and a Redis instance for session management and real-time data. The whole thing is containerized with Docker and deployed on AWS Lightsail. Build tooling is Vite — fast dev server, fast production builds, and excellent TypeScript support.
Real-time multiplayer runs over Socket.io (WebSocket with automatic fallback). Every player action — movement, combat, chat, trading — flows through the WebSocket connection. More on that in a moment.
Server-Authoritative Combat
This was the single most important architectural decision in the entire project. In EchoQuest, the server is the source of truth for all combat. When you swing your sword, your client sends an intent (“I want to attack this monster”), and the server calculates the hit, the damage, the crit chance, the armor reduction — everything. The client just displays the result.
Why go through that trouble? Because in a multiplayer browser game, the client is completely untrusted. Anyone can open DevTools, modify variables, inject scripts. If combat math ran on the client, someone could one-shot every boss in the game. Server-authoritative combat means cheating is effectively impossible for anything that matters — damage, loot drops, XP gains, PvP outcomes. Fair play isn’t optional in a multiplayer RPG. It’s the foundation.
The tradeoff is latency. Every action has a round trip to the server. We mitigate this with client-side prediction (play the attack animation immediately, reconcile when the server responds) and by keeping the game server geographically close to players. In practice, combat feels snappy. Most players never notice the round trip at all.
Real-Time Multiplayer via WebSocket
EchoQuest is a multiplayer browser game where you see other players moving around the world in real time. You can chat with them (map chat, global chat, whispers), trade items, team up for dungeons, or opt into PvP. All of this runs over a single WebSocket connection per player.
The server maintains a room-based architecture. Each map zone is a room. When you enter a zone, you subscribe to that room’s events — player positions, monster state, loot drops, combat outcomes. When you leave, you unsubscribe. This keeps the bandwidth manageable and means you only receive data relevant to where you are in the world.
Socket.io made this straightforward. It handles reconnection, room management, and graceful degradation automatically. The multiplayer infrastructure scales horizontally — Redis pub/sub bridges events across server instances if we ever need to shard.
Procedural Dungeon Generation
Dungeons in EchoQuest are procedurally generated using a Binary Space Partitioning (BSP) algorithm. The system recursively subdivides a rectangular space into smaller rooms, connects them with corridors, then populates each room with enemies, traps, treasure, and interactable objects based on the dungeon’s difficulty tier.
Each dungeon instance is unique. You might get a sprawling labyrinth with narrow corridors and ambush points, or a series of large chambers connected by a central hallway. Boss rooms are placed at the deepest point of the tree. The procedural generation keeps dungeon runs fresh — you can’t memorize the layout and speedrun it. The seed is server-generated, so every player in a group sees the same dungeon, but the next run will be different.
Mobile & Desktop from Day One
EchoQuest was designed for both mobile and desktop from the very first commit. The UI adapts to screen size — on desktop you get a hotbar with ten slots, keyboard shortcuts, and mouse-driven combat. On mobile you get a virtual joystick, tap-to-attack, and a streamlined interface that doesn’t crowd a smaller screen.
This isn’t a desktop game with a mobile afterthought bolted on. Both input modes were built in parallel. The game detects your device and adjusts accordingly. Cloud saves mean you can start a session on your PC and pick it up on your phone — your progress is always there.
What’s in the Game
As of today, EchoQuest has:
- 6 character classes — Warrior, Mage, Rogue, Ranger, Cleric, and Paladin
- 24 abilities across those classes, with cooldowns, resource costs, and synergies
- Crafting & harvesting — gather resources in the world, refine them, and craft equipment
- Multi-floor dungeons with procedural generation, bosses, and tiered loot
- Real-time multiplayer — see other players, chat, trade, PvP
- Cloud saves — your progress is never lost
- An admin dashboard for managing all game content — maps, items, monsters, quests, NPCs, dungeons, and player data
The admin dashboard deserves its own mention. Every piece of content in EchoQuest is data-driven and editable through a web-based admin panel. I can create a new monster, set its stats, assign its loot table, and place it on a map without touching code. Content iteration is fast, and I can balance the game by tweaking numbers in a form instead of redeploying the server.
The Road Ahead
EchoQuest is playable right now, but there’s a lot more coming. The quest system is getting expanded. Guild support is on the roadmap. I’m working on new maps, new dungeon tilesets, and a reputation system that ties into the world’s factions. The combat system recently got a full overhaul with shield mechanics, boss armor phases, and monster equipment — and there’s more tuning to do.
Building a browser-based RPG as a solo developer is genuinely hard. Some days I’m writing SQL migrations in the morning, debugging WebSocket race conditions in the afternoon, and pixel-pushing UI layouts at night. But every time a player discovers the game through a link and starts playing within seconds — no download, no account wall, just click and play — I know this was the right call.
If you’re a developer thinking about building an HTML5 game or an indie RPG for the browser, go for it. The tools are better than they’ve ever been. The browser is a legitimate game platform. And the zero-friction distribution is a superpower that native games simply don’t have.
— Bruno