Spacewar is one of the early RCWeb asymmetric-game prototypes. It turns a shared screen into a simple multiplayer space shooter while phones act as lightweight steering controllers. More than anything, it is useful as a developer example of the original RCWeb communication style: a viewer app exposes a small public API, controller apps send targeted remote calls into it, and the viewer sends UI updates back to specific controllers.


On the gameplay side, Spacewar is intentionally direct. Each joining phone gets its own ship in the same arena. Ships steer, accelerate, fire missiles, bounce off the arena edges, and respawn with a short invulnerability window after being destroyed. The display keeps the score labels and all combat state in one place.
From a developer perspective, the interesting part is that this version predates the more structured snapshot-driven style used by later RCWeb apps. It is a compact example of how far you can get with only room-scoped JavaScript dispatch and a few exposed viewer methods.
Spacewar uses the classic RCWeb asymmetric pattern:
/spacewar/ and owns all canonical game state./spacewar-control/ and sends input events into the viewer.rc.send(js, "!" + rc.client), using the room id already injected by the server.The communication style is deliberately simple and very "early RCWeb":
window.spacewar, mainly controlShip(player, direction).rc.sendFunctionCall("spacewar", "spacewar.controlShip", rc.client, "left" | "right" | "forward" | "fire").rc.client value becomes the stable player id on the viewer side, so the viewer does not need a separate matchmaking layer.This app is therefore a good model when you want:
For someone building a new RCWeb game, Spacewar shows the minimum viable communication architecture:
/spacewar-control/?r=<room>.rc.connect() and only send intent.It is also a reminder of the tradeoff in these early prototypes: direct remote code execution keeps the app small and fast to build, but the coupling between viewer and controller UI is tighter than in later snapshot-based apps. For a new RCWeb app, this prototype is still a very useful reference when you want the communication layer to stay minimal and you are comfortable exposing a small public API on the viewer.