Main game repository for Beyond All Reason.
  • Lua 71.3%
  • COBOL 22.1%
  • C 4.6%
  • GLSL 1.5%
  • Python 0.2%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adrian Diez Cuadrado 1c528be9bb
docs: clarify Windows and Linux development-copy paths (#9643)
Step 5 of the development quick start gives a `data/games/BAR.sdd` path for all installs, although the earlier instructions place the Linux development copy directly under `games/BAR.sdd` in the install directory.
2026-10-15 09:50:33 +03:00
.claude/skills/submodule-pointer please don't commit recoil-lua-library (#8934) 2026-08-28 16:49:13 -04:00
.github Make the busted specs order-independent (#9265) 2026-10-14 21:46:35 +03:00
.vscode lua tooling: extensions hint + .emmyrc.json + descriptive type stubs (#7550) 2026-04-29 22:11:40 +03:00
anims upgmex/areamex anim black frame fix 2022-02-08 17:47:19 +01:00
bitmaps Airjets extension (#9207) 2026-09-14 22:42:35 +02:00
common various performance optimizations (#9690) 2026-10-14 11:54:24 +02:00
doc Terraform Brush 1.16: map transform (turn, flip, resize, expand), clone the tileset variant paint, sun fixes, multi-screen support (#9328) 2026-10-09 17:16:02 +02:00
effects cleanup (#9600) 2026-10-09 12:26:36 +02:00
features cusgl4: fix: use default black teamcolor for missing texture/normalmap (#9692) 2026-10-14 17:06:28 +02:00
fonts pause screen: changed font (#7789) 2026-05-28 20:41:33 +02:00
gamedata revert sensors require upkeep (#9518) 2026-10-06 20:23:29 +02:00
icons Add Obligator, a new Cortex Scav Unit Pack defence turret (#9205) 2026-09-30 21:25:52 +03:00
language Editable custom keybind commands (#9434) 2026-10-14 21:15:49 +03:00
luaintro fix: no handler access to user widgets, confine widget env functions to their own envs (#9547) 2026-10-12 17:15:47 -04:00
luarules cusgl4: fix: use default black teamcolor for missing texture/normalmap (#9692) 2026-10-14 17:06:28 +02:00
luaui cas: bring back some contrast in low-contrast terrain (#9696) 2026-10-15 00:38:28 +02:00
mapgenerator Terraform Brush v1.11 (#8719) 2026-08-19 22:23:50 +02:00
modelmaterials_gl4 cusgl4: fix: use default black teamcolor for missing texture/normalmap (#9692) 2026-10-14 17:06:28 +02:00
modules various performance optimizations (#9690) 2026-10-14 11:54:24 +02:00
music New Raptor Music from West Basinger (#8993) 2026-09-02 21:14:43 +03:00
objects3d commando aimpoints alignment (#9665) 2026-10-15 00:40:52 +02:00
recoil-lua-library@a036fe97ca Update Lua libary submodule 2026-10-10 00:22:36 +00:00
scripts commando aimpoints alignment (#9665) 2026-10-15 00:40:52 +02:00
shaders various performance optimizations (#9687) 2026-10-13 22:32:48 +02:00
sidepics new logos (#7071) 2026-03-08 13:50:24 +01:00
singleplayer Fix don't typos (#9108) 2026-09-09 00:21:06 -04:00
sounds Rename Territorial Domination -> Dominion (#9479) 2026-10-03 19:08:09 -05:00
spec fix: keybind editbox spec stubs its globals in a SpecEnv (#9694) 2026-10-14 16:50:49 -04:00
tools Terraform Brush 1.16: map transform (turn, flip, resize, expand), clone the tileset variant paint, sun fixes, multi-screen support (#9328) 2026-10-09 17:16:02 +02:00
types Annotate the terraform brush tool and map manifest format (#8876) 2026-10-11 21:55:14 -04:00
unitbasedefs Proposed modoption (#9626) 2026-10-11 20:35:43 +02:00
unitpics Updates the buildpic for the legion adv solar (#9523) 2026-10-14 21:10:18 +03:00
units Afus health fix (#9629) 2026-10-11 21:47:13 +03:00
unittextures cleanup (#9600) 2026-10-09 12:26:36 +02:00
weapons gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
.busted Make the busted specs order-independent (#9265) 2026-10-14 21:46:35 +03:00
.editorconfig .editorconfig line endings (#4519) 2025-03-17 12:22:21 -04:00
.emmyrc.json module loader (#8484) 2026-09-23 22:13:12 +03:00
.git-blame-ignore-revs git-blame-ignore-revs: point at the merged SHAs (#8734) 2026-08-12 22:57:36 -04:00
.gitattributes add .gitattributes: tries to forces the same lineending everywhere 2016-10-11 20:43:53 +02:00
.gitignore gitignore: ignore .lux in symlink form too (#8720) 2026-08-12 21:42:52 +03:00
.gitmodules Add recoil-lua-library submodule (#4286) 2025-03-23 22:25:56 +01:00
.luacheckrc Don't lua check mapgenerator/** templates, (#9147) 2026-09-08 15:03:57 -04:00
.stylua.toml Enable stylua on changed files in pull requests (#8619) 2026-08-19 21:51:55 +03:00
.styluaignore ci: no style on missionapi test data files (#8878) 2026-08-24 11:25:34 -04:00
.travis.yml basic luacheck & travis setup 2020-11-17 00:51:48 +09:00
AI_POLICY.md Create AI_POLICY.md (#6758) 2026-02-05 19:33:52 +01:00
changelog.md fix: popup defenses block shots, reverse direction snappily (#9689) 2026-10-13 20:33:53 -04:00
cmdcolors_icexuick.txt selectionbox: made minimap selectionbox stylized as well (#6445) 2025-12-21 12:23:29 +01:00
CONTRIBUTING.md Assign unused multiple-return values to _ (#9066) 2026-09-23 22:05:39 +03:00
EngineOptions.lua gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
init.lua fix: no handler access to user widgets, confine widget env functions to their own envs (#9547) 2026-10-12 17:15:47 -04:00
LICENSE.md Broken Link Fix for Recoil Engine in LICENSE.md (#6925) 2026-02-19 09:54:46 +01:00
license_bitmaps.txt License correction on Art Assets 2024-05-24 15:08:25 +02:00
license_general.txt General information update 2022-11-03 15:39:51 +01:00
license_icons.txt Bugfixes & Error Removal Hunting & Added some missing Buildpics 2020-10-07 11:49:50 +02:00
license_music.txt Fix typos (#8472) 2026-08-19 21:52:13 +03:00
license_sounds.txt feat: When a player requests metal or energy, play an alert sound (#6236) 2026-01-15 22:08:17 +02:00
license_unitpics.txt Bugfixes & Error Removal Hunting & Added some missing Buildpics 2020-10-07 11:49:50 +02:00
luaai.lua gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
luac.out teamstats: refinements and more graphs (#9289) 2026-09-19 03:29:56 +02:00
luaui.lua Fix typos (#8472) 2026-08-19 21:52:13 +03:00
lux.lock lux: drop redundant luassert dep, bump CI lx to 0.29 (#7616) 2026-06-03 22:16:12 +03:00
lux.toml lux: drop redundant luassert dep, bump CI lx to 0.29 (#7616) 2026-06-03 22:16:12 +03:00
modinfo.lua gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
modoptions.lua Rename Territorial Domination -> Dominion (#9479) 2026-10-03 19:08:09 -05:00
README.md docs: clarify Windows and Linux development-copy paths (#9643) 2026-10-15 09:50:33 +03:00
springignore.txt Unit Test Bootstrapping (#5902) 2026-03-19 21:43:12 +02:00

Beyond-All-Reason

Discord

Open source RTS game built on top of the Recoil RTS Engine

Where to download

https://www.beyondallreason.info/download

How to play

https://www.beyondallreason.info/guides

Development Quick Start

Beyond All Reason (BAR), consists of 2 primary components, the lobby (Chobby - https://github.com/beyond-all-reason/BYAR-Chobby) and the game code itself (this repository).

The game runs on top of the Recoil engine https://github.com/beyond-all-reason/RecoilEngine.

In order to develop the game (this repository) you first need a working install of the lobby/launcher. There are 2 ways to do this:

  1. Download the full BAR application from the website and run it. This is probably what you will have done if you have previously installed and played the game.

  2. OR if you want to develop the lobby client, follow the guide in the Chobby README. First download a release of Chobby and then launch Chobby, this will automatically download and install the engine and other dependencies.

Once you have a working install of BAR you need a local development copy of the game code to work with. This code will live in the BAR install directory.

  1. To find the BAR install directory simply open the launcher (not full game) and click the "Open install directory" button. This is one of the 3 buttons (Toggle log and Upload log are the other 2). For Windows installs this might be your user's AppData/Local/Programs/Beyond-All-Reason/data directory, for Linux it might be your user's .local/state/Beyond All Reason/ directory.

  2. In the BAR install directory create the empty file devmode.txt. E.g: AppData/Local/Programs/Beyond-All-Reason/data/devmode.txt or .local/state/Beyond All Reason/devmode.txt.

  3. In the BAR install directory (inside the data folder on Windows) in the games sub-directory (create games if it doesn't exist) clone the code for this repository into a directory with a name ending in .sdd. For example:

git clone --recurse-submodules https://github.com/beyond-all-reason/Beyond-All-Reason.git BAR.sdd

Ensure that you have the correct path by looking for the file Beyond-All-Reason/data/games/BAR.sdd/modinfo.lua on Windows, or .local/state/Beyond All Reason/games/BAR.sdd/modinfo.lua on Linux.

  1. Now you have the game code launch the full game from the launcher as normal. Then go to Settings > Developer > Singleplayer and select Beyond All Reason Dev.

  2. Now you can launch a match normally through the game UI. This match will use the development copy of the Lua code in the BAR.sdd directory you cloned in step 3.

  3. If developing Chobby also clone the code into the games directory. Follow the guide in the Chobby README.

  4. (Optional, Advanced) If you want to run automated integration tests, see the testing documentation

More on the .sdd directory to run raw LUA and the structure expected by Spring Engine is documented here.


Automated Testing

Prereqs

Lua 5.1

debian/linux

sudo apt install -y lua5.1

windows (MSYS2 UCRT64)

pacman -S --needed mingw-w64-ucrt-x86_64-lua51

macOS

brew install lua@5.1

Lux Package Manager Follow the Lux Getting Started Guide.

Or follow the Cargo instructions to manually build on the Lux Github

Install Project Packages

From the repo root (where lux.toml lives):

lux --max-jobs=2 update

Note: in my testing --max-jobs was super specific to my machine and anything above that number would sometimes cause deadlocks.

Running Tests

Run the full suite (via Busted):

# preferred for predictable CLI behavior
busted

Filter by tag:

busted -t focus

Optionally, run through Lux’s wrapper:

lx test
# run the emmylua type check
lx check
# or to drop into a shell so you can run `busted` manually
lx shell --test
busted
8 successes / 0 failures / 0 errors / 0 pending : 0.246881 seconds

See Lux Guides for more information.

Inspect objects inline while debugging:

print(VFS.Include("inspect.lua")(someObject))

VS Code Test Switcher (optional)

This handy plugin lets you switch between the test and the code-being-tested just by tapping Cmd+Shift+Y.

VSCode Plugin: https://marketplace.visualstudio.com/items?itemName=bmalehorn.test-switcher

Then open User Settings (JSON) and add:

"test-switcher.rules": [
    {
        "pattern": "spec/(.*)_spec\\.lua",
        "replacement": "$1.lua"
    },
    {
        "pattern": "spec/builder_specs/(.*)_spec\\.lua",
        "replacement": "spec/builders/$1.lua"
    },
    {
        "pattern": "spec/builders/(.*)\\.lua",
        "replacement": "spec/builder_specs/$1_spec.lua"
    },
    {
        "pattern": "(luarules|common|luaui|gamedata)/(.*)\\.lua",
        "replacement": "spec/$1/$2_spec.lua"
    }
],