An AI-porting experiment — this fork uses AI agents to modernise the original codebase: CMake build system, Linux/SDL2 backend, MinGW cross-compile, and an expanding test suite. See
ai/for the task log.
Robot Warfare 2D is a programmable-robot battle game originally written for Windows with Borland C++. Robots are programmed in a simple custom language, compiled to bytecode, and fight on a tile-based 2D arena.
This repository is forked from the original source release by A.A. Shabarshin:
- This fork (rw2d): https://gitlab.com/shaos/rw2d
- Predecessor — Robot Warfare 1 for DOS: https://gitlab.com/shaos/rw1o
- Original project website: http://robots.chat.ru/
Copyright © 1998–2013 A.A. Shabarshin me@shaos.net
Released under the MIT licence (see LICENSE).
The robot source files in robots/src/ were taken from the
original project website archive:
http://robots.chat.ru/robot_s.zip
This fork is an experiment in AI-assisted software porting. The goal is to take the original Windows/Borland codebase and bring it to a modern, cross-platform toolset using AI agents as the primary development driver:
- CMake build system replacing the original Borland makefiles
- Native Linux backend (SDL2 rendering)
- MinGW-w64 cross-compilation for Windows (preserving the original Win32/GDI frontend)
- Automated test suite (compiler regression tests, headless runtime tests, render checks)
No manual refactoring of the core game logic — only the platform layer and build infrastructure are touched by the port.
Install dependencies (Debian/Ubuntu):
sudo apt install build-essential cmake clang clang-format clang-tidy libsdl2-devBuild:
makeRun tests:
make testFormat and lint new porting source files:
make format
make lintInstall MinGW-w64 (Debian/Ubuntu):
sudo apt install mingw-w64Build Windows binaries (rw1_comp.exe, rw1_arena_headless.exe, rw1_arena_win.exe):
make crossOutput is placed in build-windows/. Three binaries are produced:
| Binary | Description |
|---|---|
rw1_comp.exe |
Robot source compiler (.rw1 → .rw0) |
rw1_arena_headless.exe |
Headless arena — console only, no window |
rw1_arena_win.exe |
Windowed arena — original Win32/GDI frontend |
The SDL2 rendering backend (rw1_arena_sdl) is omitted from the cross-build
because SDL2 Windows development libraries require separate setup
(download from libsdl.org).
To smoke-test the Windows binaries locally using wine64 (no i386 required):
sudo apt install wine64
make test-winemake test-wine runs rw1_arena_win.exe for 10 seconds then exits automatically.
It sets WINEDEBUG=-all to suppress the spurious wine32 is missing warning that
the wine launcher prints on stderr even for 64-bit executables.