CASE · 01 IN DEVFull MMORPG client-server reimplementation. In development.

DASB

Phaser 3SvelteTypeScriptBunExpressSQLiteTypeORMWebSocketTCPTurbo
01Overview

DASB is a full-stack reimplementation of a proprietary MMORPG as a modern browser-based client-server architecture. It provides both a playable game client (Phaser 3 + Svelte) and a complete game server (Bun). All in TypeScript across a Turbo monorepo with 7 shared packages and 90+ custom network packet types. The exercise: reverse-engineer a proprietary binary protocol and rebuild both sides from scratch with modern tooling.

02The Challenge

Why build this?

The original client is decades old, locked to a proprietary Windows executable with no extensibility. Running private servers or modifying the experience required reverse-engineering the binary protocol and encryption, which gated the community behind deep networking work. DASB tackles the full rebuild: reverse-engineer the protocol, rebuild both client and server in TypeScript, and make the game playable in any browser without downloads.

03Features

What it does.

F.01

Full Game Client

A complete web-based game client recreating the experience in the browser with Phaser 3 and Svelte.

  • Isometric map rendering with sprite animation and tile layers
  • Character creation and customization (hair, color, skin, body type)
  • Player movement and navigation with A* pathfinding (EasyStar.js)
  • Inventory, spell book, and skill book with observable lists
  • Equipment system with paper-doll character display
  • Chat system with multiple message types (normal, whisper, emote)
  • Portal/map transitions with interest-area visibility culling
  • Camera controls, centering, and parallax effects
F.02

Full Game Server

A production-capable game server handling authentication, world state, and real-time multiplayer networking.

  • Complete protocol implementation with packet handler decorators
  • Multi-listener architecture: Gateway → Auth → World
  • Player persistence with SQLite via TypeORM (Active Record)
  • Character creation with appearance finalization and stat management
  • Login/authentication with Argon2 password hashing
  • Map management with room systems and player transfers
  • Collision detection and physics for entity interactions
  • Scene tree with server-side entity management and interest-based visibility
F.03

Networking Layer

A custom networking stack fully implementing the binary protocol with encryption, compression, and secure session management.

  • 40+ client packet types (movement, combat, chat, items, NPCs, groups)
  • 50+ server packet types (display, UI updates, map changes, effects)
  • Custom XOR-based encryption with ordinal shifting and key salts
  • Binary serialization/deserialization with Pako (zlib) compression
  • Seed-based key derivation and secure key exchange
  • Redirect system with unique IDs for secure session handoff
  • Dual transport: TCP (port 2610) and WebSocket (port 8080/443)
F.04

Monorepo Architecture

A well-structured Turbo monorepo maximizing code sharing between client and server.

  • @medenia/network: 90+ protocol packet definitions and server tables
  • @medenia/encryption: crypto for packet encryption/decryption
  • @medenia/serialization: binary reader/writer with Pako compression
  • @medenia/fsm: finite state machine for client-side state
  • @medenia/maxrects-packer: sprite atlas packing for assets
  • Turbo build orchestration with Bun workspace management
  • Shared TypeScript config, ESLint, and Prettier across packages
04Architecture

How it's built.

A Turbo monorepo with two main apps (client and server) sharing code through 7 packages. The client uses Phaser 3 for WebGL game rendering with a Svelte overlay for UI. The server runs on Bun with dual TCP/WebSocket listeners, TypeORM for persistence, and a listener-based routing architecture.

L.01

Game Client

Phaser 3.80Svelte 5Vite 5.2Tailwind CSSComlink (Web Workers)Stats.js
L.02

Game Server

Bun 1.1ExpressTypeORM 0.3SQLite3Argon2EventEmitter3
L.03

Networking

TCP Server (port 2610)WebSocket (port 8080/443)Custom Binary ProtocolXOR Encryption
L.04

Shared Packages

@medenia/network@medenia/encryption@medenia/serialization@medenia/fsm@medenia/maxrects-packer
05In Action
[ PENDING ]

Game Client View

screenshot coming soon

[ PENDING ]

Character Creation

screenshot coming soon

[ PENDING ]

Map Rendering

screenshot coming soon

[ PENDING ]

Inventory System

screenshot coming soon

[ PENDING ]

Server Architecture

screenshot coming soon

06By The Numbers

90+

Packet Types

7

Shared Packages

100+

TypeScript Files

Full Stack

Architecture

07Next

Want something like this
built for you?

Grab a 20-minute call. No pitch deck, no sales funnel. Tell me what you're building and I'll tell you if I'm the right person for it.

Back to portfolio