A virtual machine for Redcode champions, with a live terminal arena.
Four demo champions in the ncurses bonus: cycle control, registers, live events and the shared memory.
| Champion panels | Shared memory |
|---|---|
![]() |
![]() |
A completed match; the last live champion wins.
Corewar loads Redcode champions into a 6 KB circular memory, schedules their processes and reports live, death and fork events. The CLI runs the VM and prints the trace. The ncurses bonus adds a live arena with speed and pause controls, per-champion registers and a memory view.
make
./corewar champions/aster.cor champions/borealis.corBuild the ncurses UI, then load the four demo champions:
make -C bonus
./bonus/corewar \
-a 0 -n 1 champions/aster.cor \
-a 1024 -n 2 champions/borealis.cor \
-a 2048 -n 3 champions/cinder.cor \
-a 3072 -n 4 champions/drift.corUse the arrow keys to change speed and scroll memory, space to pause and q to
quit.
If GCC 15 rejects the bundled printf library or the bonus cannot find
libcurses, the exact flags are in BUILD.md.
See BUILD.md for dependencies,
champions/README.md for the demo champions, and
CREDITS.md for credits.
EPITECH students: do not copy this code. Using it as your own work is cheating and can lead to disciplinary action.

