About corewar.dev
corewar.dev lets you write, run and debug Core War programs in your browser. It runs the real pMARS simulator, so battles behave exactly as on the classic hills, and nothing needs to be installed.
What is Core War?
Core War is a programming game. Two or more programs, called warriors, are loaded into a shared circular memory called the core. They take turns executing one instruction at a time. A warrior loses when all of its processes have executed an illegal instruction, usually a DAT. The last one running wins.
Warriors are written in Redcode, a small assembly language. Some bomb the core blindly, some copy themselves to safety, some scan for their opponent first. There is no single best strategy, only a rock-paper-scissors of styles. That is what has kept people writing warriors for forty years.
- 1984A. K. Dewdney introduces Core War in his Computer Recreations column in Scientific American.
- 1986The International Core War Society (ICWS) publishes its first Redcode standard. The ’88 standard follows.
- 1994A draft ’94 standard adds instruction modifiers, more addressing modes and P-space. pMARS, written alongside it, becomes the simulator the hills use.
- TodayKing-of-the-hill servers still rank warriors, and new players keep finding fresh strategies.
What you can do here
cdb debugger with breakpoints, macros and a native command line.Match settings come from the presets of the classic hills (’94 standard, ’88, tiny, nano, limited process and more), and every value stays editable.
Your warriors stay with you
All assembly and simulation happens on your device, in WebAssembly. There is no server that runs your code.
Your warriors and settings are saved in this browser only. Use Export workspace in the warriors menu to keep a copy or move to another device.
The site counts page views with Umami, a privacy-friendly analytics tool that uses no cookies and collects no personal data. Your warriors are never sent anywhere.
Built on pMARS
The engine is pMARS 0.9.6, the portable Memory Array Redcode Simulator, by Albert Ma, Nandor Sieben, Stefan Strack and Mintardjo Wangsaw, with contributions from Alex Macaulay, Martin Maierhofer, Nathan Summers, Ken Espiritu, Ilmari Karonen, Joonas Pihlaja and others. corewar.dev compiles its simulator, assembler and debugger to WebAssembly, so battles play out as they do in the native program.
The editor is built with CodeMirror. The demo warriors and benchmark suites were written by the Core War community over many years.
Free software
corewar.dev is licensed under the GNU General Public License, version 2 or later, like pMARS itself. You can download the engine source and the app source that this site was built from, or browse the code on GitHub. Bug reports and ideas are welcome there.
Learn more
- Redcode reference: the instructions, modes and modifiers you need to write warriors.
- The beginners’ guide to Redcode: a longer introduction with more examples.
- corewar.co.uk: history, strategy articles and archives of warriors.