More info on corewars simulator

Written by

in

The corewars simulator I used wasn’t the MARS redcode simulator… more info here…

AI Mode conversation

You said: redcode corewarsredcode corewars

Redcode is an assembly-like programming language used to write battle programs called “warriors” for the classic computer programming and hacking game Core War.

Core Concepts

  • The Environment: Warriors run inside a virtual computer called MARS (Memory Array Redcode Simulator), which features a circular array of memory cells (typically 8,000 cells).
  • The Goal: Programs execute alternately, attempting to disrupt, overwrite, or cause the opponent’s code to execute an illegal instruction (such as DAT) to terminate all of its processes.
  • Redcode Syntax: Each instruction consists of an opcode, two operands (A-field and B-field), addressing modes, and optional modifiers (e.g., MOV 0, 1 or DAT.F $0, $0).

Common Redcode Instructions

  • DAT (Data): Stores data; executing this instruction kills the current process.
  • MOV (Move): Copies data or instructions from one memory address to another.
  • ADD / SUB (Add / Subtract): Performs basic arithmetic on memory fields.
  • JMP (Jump): Unconditional branch to another instruction address.
  • SPL (Split): Creates a new parallel process, enabling multitasking/multithreading.
  • IMP (Imp): A classic, minimalist mobile warrior that continuously copies itself to the next memory address (MOV 0, 1 then JMP -1).

Common Warrior Strategies

  • Bomber (Stone): Blindly and repeatedly writes “bomb” instructions (like DAT) across the core memory to hit the enemy.
  • Scanners (Scissors): Searches the memory core to locate the opponent’s code before attacking the detected location.
  • Replicators (Paper): Constantly creates copies of itself across the core to out-survive and overwhelm enemy attacks.
    Would you like to see a sample Redcode warrior script (such as the classic Imp or Dwarf), or learn how to test code in a web-based MARS simulator?

Corewars
Beginner’s guide to Redcode
Core War: Programming game where abstract assembly programs (warriors) execute alternately in a circular memory core (array of ins…

*
Wikipedia
Core War – Wikipedia
Overview: 1984 programming game by D.G. Jones and A.K. Dewdney where battle programs (warriors) compete in a virtual computer (cor…

*
Read the Docs
Intro – Corewar.io Documentation
Language: Redcode assembly-like language used to write Corewar warriors, consisting of an opcode and two operands (e.g., mov 0, 1)
Show all

corewars from redhat 6 or redhat 7 wasn’t a redcode one… do you know of it?

Yes, you are likely thinking of a popular open-source software package simply called corewars (usually version 0.9.x, such as corewars-0.9.13), which was widely bundled in the “Games” or “Strategy” repositories of Linux distributions like Red Hat Linux 6.x and 7.x in the late 1990s and early 2000s.
While it was a simulation game where programs tried to crash each other, it differed significantly from standard, hardcore ICWS-compliant Redcode systems (like pMARS) in a few key ways:

  1. It Was Built Around an Abstract x86-like Assembly, Not Pure Redcode

While inspired by Core War, this specific corewars Linux package was intended as a graphical tool to help computer science students and hobbyists learn real-world Assembly programming (primarily mimicking basic Intel x86/register-based logic).

  • Instead of the abstract relative-addressing fields of Redcode (A-fields and B-fields with symbols like $, @, <), it used registers (like ax, bx) and standardized instructions.
  • It felt much more like coding a mini x86 assembly program than writing a standard Redcode “warrior”.
  1. The Iconic GTK+ Graphical Interface

If you played this on Red Hat 6 or 7, you likely remember its GTK+ graphical user interface. It didn’t look like a command-line simulator or a text-based terminal grid.

  • It featured a prominent live memory grid window where you could see the bytes of different programs color-coded (e.g., player one’s code in red, player two’s in blue) slowly overwriting or jumping through each other in real-time.
  • It featured a side-by-side statistics window tracking active processes, program lengths, and CPU execution cycles.
  1. A Closed, Fixed “Toy” Environment

Unlike the infinite variations of the modern Redcode standards, this specific Linux port came pre-packaged with just a handful of classic sample assembly bots (default.asm, etc.) designed to show you how basic assembly loops, pointer increments, and register shifts worked. It was incredibly popular on early Linux desktop installations because it was one of the few animated, technical strategy games you could install natively via a standard package or lightweight tarball.
Does the memory of a color-coded grid using an x86/register syntax ring a bell? If you are trying to track down that specific old software or want to find a way to run those .asm style programs today, let me know!

*
Corewars
Beginner’s guide to Redcode
The Redcode instruction set The Imp The truth is, the most important parts of Redcode are the easiest ones. Most of the basic warr…

*
Wikipedia
Core War – Wikipedia
Overview: 1984 programming game by D.G. Jones and A.K. Dewdney where battle programs (warriors) compete in a virtual computer (cor…

  • Beej.us
    Core War Frequently Asked Questions (rec.games.corewar FAQ)
    Redcode has been standardized by the ICWS, and is therefore transportable between all standard Core War systems.
    Show all

where is it now? i can’t find the source code for it anywhere… is it dead?

The game is technically “dead” in terms of modern updates—the last stable release was version 0.9.13, published back on October 31, 2002. However, because it was released under a free software GPLv2 license, the source code is not lost. It is just buried deep inside ancient open-source archives.
The specific project you are remembering was developed by Philip Thorne and Walter Hofmann. It featured a custom, simplified assembly-like language as its default mode alongside a graphical GTK+ interface.

Where to Find the Source Code

The code is still hosted on its original, legacy project pages. You can download the pristine tarballs here:

  • SourceForge Repository: The project remains frozen exactly as it was left on the Corewars SourceForge Files Page.
  • Direct Source Link: You can pull the exact last release directly via the corewars-0.9.13.tar.gz download link.

Why is it so hard to run today?

If you download that source code, you will likely struggle to compile it on a modern Linux distribution (like Ubuntu 24.04 or Fedora 40) out of the box.
The game relies entirely on GTK+ 1.2, an incredibly old version of the GIMP Toolkit that was replaced by GTK2 in 2002 and GTK3/4 since. Modern C compilers will also reject the vintage 1990s C syntax without passing specific legacy flags (like -std=gnu89) to the compiler.

How to Play it Now

If you want to experience that exact x86/register style game loop or run the source code, you have two realistic paths:

  1. Run a Retro Linux VM: Spin up a lightweight virtual machine running an era-appropriate operating system like Red Hat Linux 7.3 or Debian 3.0 (Woody). The game will install natively or compile instantly.
  2. Look at the OpenBSD Package: Interestingly, the OpenBSD community has actively maintained a port of it in their package trees (listed as corewars-0.9.13p12), patching the ancient source code over the years to keep it alive on their platform.
    Would you like some help trying to compile the old code on a modern system, or would you prefer recommendations for modern alternatives that use real x86 Assembly for programming battles?

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *