Overview Link to section: Overview
I’m building OpenRP as a multiplayer city sandbox—a place where players can choose their own activities—that runs in a browser. Players can take jobs, buy property, operate businesses, build with physics props (objects that can move and collide), and participate in elections and city laws.
I took inspiration from the social sandbox of DarkRP, a roleplay game mode for Garry’s Mod. OpenRP has its own implementation and locally generated map geometry (the shapes that make up the map), characters, equipment, textures, and sound effects.
A Garry’s Mod installation or extracted game assets are not required.
The city and its systems Link to section: The city and its systems
The city connects several activities through shared resources and ownership:
- Jobs: roles define salaries, equipment, and access to businesses.
- Property: doors can be purchased, named, locked, and shared through keys.
- Businesses: stock, prices, and purchases connect a shop to its owner.
- Construction: players manipulate props using physics and tool controls.
- Government: elections, laws, licenses, warrants, and arrests change city life.
- Social play: nearby chat, roleplay actions, group channels, and proximity voice (voice chat limited by how close players are) support interaction.
The Union District includes neighborhoods, multi-room apartments, and businesses. Shared lobbies remain public while individual units have their own ownership.
Multiplayer architecture Link to section: Multiplayer architecture
Rendering and server decisions Link to section: Rendering and server decisions
I use Three.js, a JavaScript 3D graphics library for the browser, to render the world. A Cloudflare Worker (code running on Cloudflare) serves the client and both WebSocket paths. A Durable Object (a shared, stateful instance) owns the world, including movement checks, rigid-body physics (simulating how solid objects move and collide), combat, and economic transactions.
WebSockets—a connection that stays open so the browser and server can send messages both ways—carry commands and state updates.
Keeping movement responsive Link to section: Keeping movement responsive
The simulation runs at 30 Hz (30 updates per second), with 15 Hz snapshots (shared copies of the game state sent 15 times per second). Client prediction estimates movement in the browser before the server responds; interpolation fills in movement between received states.
These help movement look responsive between updates from the authoritative server, which has the final say on game state. Purchases and combat results still depend on server decisions.
Voice connections Link to section: Voice connections
Voice has a separate connection path with server-enforced proximity, explicit microphone controls, and independent muting. The hosting setup has to support long-lived connections for both gameplay and voice.
First session and controls Link to section: First session and controls
Open OpenRP, choose an account or Guest, then return to the streets. The field guide explains the controls inside the game.
| Control | Use |
|---|---|
| WASD and mouse | Move and look |
| E | Use the targeted object |
| F4 | Jobs, shop, laws, and voting |
| Q | Building tools and props |
| C | Context actions |
| F1 | Field guide |
| V | Push-to-talk after enabling the microphone |
Guests and accounts Link to section: Guests and accounts
Guest identities rely on a stored browser credential, a saved identifier that lets the server recognize the guest. An account can claim the guest character’s belongings. Accounts belong to the server being played on; independently hosted servers do not share an account database.
Running a local copy Link to section: Running a local copy
Use Node.js 22.12 or newer. From a checkout:
npm ci
npm run dev
Open http://localhost:8787, an address on your own computer. Vite builds the client, and Wrangler runs the Worker and a local Durable Object.
Hosting on the internet Link to section: Hosting on the internet
To self-host on your own Cloudflare account, configure your domains and origins in wrangler.jsonc, authenticate Wrangler, set the private secrets, and run npm run deploy. Hosting is subject to Cloudflare usage limits and billing. See the hosting guide for deployment, backups, and runtime limits.
Status and reference Link to section: Status and reference
OpenRP is a playable alpha. I’m still developing its systems and tuning how they interact.
The public repository contains the source, control reference, configuration, and self-hosting documentation (instructions for running your own server). The cover is project artwork showing the city.
FAQ
What is OpenRP?
A multiplayer city sandbox that runs in a browser. Players can take jobs, buy property, run businesses, build with physics props, and take part in elections and city laws. It is a playable alpha.
Do I need Garry's Mod to play OpenRP?
No. OpenRP takes inspiration from DarkRP but has its own implementation and locally generated map geometry, characters, equipment, textures, and sound effects. A Garry's Mod installation or extracted game assets are not required.
What is OpenRP built with?
Three.js renders the world in the browser. A Cloudflare Worker serves the client and WebSocket paths, and a Durable Object owns the world state, physics, combat, and economy, simulating at 30 Hz with 15 Hz snapshots.
Can I host my own OpenRP server?
Yes. The public repository documents self-hosting on your own Cloudflare account; local development uses Node.js 22.12 or newer. Accounts belong to the server being played on.
