Skip to content

min0ru/rw2d

Repository files navigation

Robot Warfare 2D

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.

Origin

This repository is forked from the original source release by A.A. Shabarshin:

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

Project Goal

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.

Building on Linux

Install dependencies (Debian/Ubuntu):

sudo apt install build-essential cmake clang clang-format clang-tidy libsdl2-dev

Build:

make

Run tests:

make test

Format and lint new porting source files:

make format
make lint

Cross-Compiling for Windows (from Linux)

Install MinGW-w64 (Debian/Ubuntu):

sudo apt install mingw-w64

Build Windows binaries (rw1_comp.exe, rw1_arena_headless.exe, rw1_arena_win.exe):

make cross

Output 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-wine

make 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.

About

Cross-platform port (fork) of the Robot Warfare project (rw2d)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors