Skip to content

Repository files navigation

OpenYRWeb

A self-hostable, open-source web port of Command & Conquer: Red Alert 2 — Yuri's Revenge. The client is built entirely from this repository's source — single-player skirmish and replay run fully in the browser.

License: Apache-2.0


What this is

OpenYRWeb is a browser-based engine for Red Alert 2 / Yuri's Revenge. It re-implements the engine (rendering, simulation, AI, asset decoding) natively in the browser, reading the original game data files (.mix archives) that you supply.

Status

  • Single-player skirmish / replay: working offline.
  • 🚧 Self-hosted multiplayer (Westwood Online protocol): in progress.
  • The engine source (src/) is a reconstructed, repackable SystemJS module set — readable and modifiable.

⚠️ You must supply your own game data

OpenYRWeb does not distribute copyrighted game data, so there is no automatic download. To play you provide your own legally-obtained copy:

  1. Build & serve the client (see below), open it in a browser.
  2. In the game-resources dialog, click Browse for folder and pick an installed Red Alert 2 / Yuri's Revenge folder — or Browse for archive and choose a .zip / .7z / .rar containing the six .mix files:
    • ra2.mix, ra2md.mix (game assets)
    • language.mix, langmd.mix (strings)
    • multi.mix, multimd.mix (multiplayer maps)

Red Alert 2 and Yuri's Revenge are © Electronic Arts. Buy them from a legitimate retailer; this project is unaffiliated with EA and distributes none of their assets.


Quick start (local)

Prerequisites

  • Node.js ≥ 20

1. Install dependencies (project-local)

npm install

2. Build the vendor bundle + client

npm run build:vendor   # bundle npm deps (react/three/@puzzl/core/...) into vendor/dist
npm run build          # src/ + vendor/ -> build/ (the deployable client)

3. Serve and play

npm run serve          # serves build/ at http://127.0.0.1:8080

Open the URL, then point the game-resources dialog at your RA2/YR folder or archive.


Deployment (GitHub Pages)

This repository deploys itself to GitHub Pages via a CI workflow (.github/workflows/deploy.yml): on every push, Actions runs npm ci, npm run build:vendor, npm run build, and publishes build/ to Pages.

For your own static host, just run the build and serve the generated build/ directory with any static file server. No server-side proxy or backend is needed.


Repository layout

src/                 engine source (SystemJS modules) — committed
  ├─ engine/ network/ data/ gui/ game/ worker/ util/
  └─ _module-map.json      module dependency graph
vendor/              vendored third-party libraries + npm bundles — committed
  ├─ lib/            single-file FOSS libs (three.js, SystemJS, lzo, ...)
  ├─ dist/           npm-built bundles (vendor.bundle.js, worker.js) + wasm tools
  ├─ res/            fonts (OFL), UI icons, locale templates
  ├─ templates/      index.html + style.css base templates
  └─ THIRD_PARTY_LICENSES.md
res/cd-overrides/    engine-required INI overrides (YR bug-fixes, MP modes)
tools/               build/repack/build-vendor/split/fetch scripts
server/              static file server (serves build/) + config/
build/               build output (.gitignore, regenerated by `npm run build`)
LICENSE  README.md  package.json

Build commands

npm install
npm run build:vendor   # bundle npm deps -> vendor/dist/{vendor.bundle,worker}.js
npm run build          # build/ (the deployable client)
npm run serve          # serve build/ at :8080
npm run test:boot      # jsdom boot smoke (module-graph integrity check)

The development toolchain for regenerating src/ from an upstream bundle (fetch / split / beautify) lives under tools/ and is not required to build or run the client.


License

Apache-2.0. See LICENSE and vendor/THIRD_PARTY_LICENSES.md for the licenses of vendored third-party libraries.

Red Alert 2™ and Yuri's Revenge™ are trademarks of Electronic Arts. This project is a non-commercial fan work, unaffiliated with EA, and does not distribute any copyrighted game assets.

About

A self-hostable, open-source web port of Command & Conquer: Red Alert 2 — Yuri's Revenge. Single-player skirmish/replay in the browser; supply your own game data.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages