# OpenRP

> A multiplayer city sandbox in the browser, with jobs, property, businesses, and server-owned physics.

Canonical page: [OpenRP](<https://devanmetz.com/portfolio/openrp/>)

Project date: Sep 2026

Updated: 2026-10-26

Category: Game development

Status: Public alpha

Tags: Three.js, TypeScript, Cloudflare Workers, Durable Objects, WebSockets

- **My work:** Game systems, networked simulation, and original assets
- **Stack:** Three.js · TypeScript · Cloudflare Workers
- **Release:** Playable 0.6 alpha

- [Visit OpenRP](<https://openrp.dev>)
- [View source](<https://github.com/DevanMetz/openrp>)

## In short

I’m building OpenRP, a multiplayer city game that runs in a browser, where players can take jobs, own property, and shape city life. Its shared systems connect businesses, construction, and government without requiring a Garry’s Mod installation. It is a playable alpha, and I’m still developing and tuning its systems.

![OpenRP project artwork showing the low-poly city and its jobs, property, and physics systems.](<https://devanmetz.com/_astro/openrp.I2SRLusV_AL0g2.webp>)

OpenRP’s project artwork, showing the browser-built city.

## 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 

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 

### 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 

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 

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 

Open [OpenRP](<https://openrp.dev/>), 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 

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 

Use Node.js 22.12 or newer. From a checkout:

```sh
npm ci
npm run dev
```

Open [http://localhost:8787](<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 

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](<https://github.com/DevanMetz/openrp/blob/main/docs/HOSTING.md>) for deployment, backups, and runtime limits.

## Status and reference 

OpenRP is a playable alpha. I’m still developing its systems and tuning how they interact.

The [public repository](<https://github.com/DevanMetz/openrp>) 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.

## Related reading

- [Poker With Your Friends](<https://devanmetz.com/portfolio/poker-with-friends/index.md>)
- [KICKR CORE 2 Hub](<https://devanmetz.com/portfolio/kickr-core-hub/index.md>)
- [Market Atlas](<https://devanmetz.com/portfolio/market-atlas/index.md>)
