Main game repository for Beyond All Reason.
  • Lua 68.9%
  • COBOL 24.2%
  • C 5%
  • GLSL 1.6%
  • AngelScript 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-16 21:48:06 +02:00
.github customformations: fix regarding multi unit linedrag on water placing on sea floor (#8699) 2026-08-09 16:41:21 +02: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 added back texture used by some maps (#7869) 2026-06-05 15:47:18 +02:00
common env(llm): type-check env layer — .emmyrc config, type stubs, manual fixes 2026-08-12 20:49:52 -06:00
doc Tf brush improvements 10 (#8691) 2026-08-10 17:48:43 +02:00
effects gen(bar_codemod): bracket-to-dot 2026-08-12 20:49:52 -06:00
features gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
fonts pause screen: changed font (#7789) 2026-05-28 20:41:33 +02:00
gamedata Fix scav and raptor spawners: expose BAR to the def-file sandbox (#8759) 2026-08-15 21:31:57 +03:00
icons Scav nerfs (#7530) 2026-04-25 20:28:54 +02:00
language top bar: added "Info" button that toggles gameinfo + circle with the number of non default modoptions (#8768) 2026-08-16 21:48:06 +02:00
luaintro pip: performance optimizations (#8748) 2026-08-15 01:03:40 +02:00
luarules placed mod options translations into I18N and made the gameinfo widget use it (#8767) 2026-08-16 21:25:09 +02:00
luaui top bar: added "Info" button that toggles gameinfo + circle with the number of non default modoptions (#8768) 2026-08-16 21:48:06 +02:00
mapgenerator Terraform Brush: TILESET tool with biome library, heightmap picker fix, New Map naming (#8500) 2026-07-27 21:02:57 +02:00
modelmaterials gen(bar_codemod): bracket-to-dot 2026-08-12 20:49:52 -06:00
modelmaterials_gl4 gen(bar_codemod): bracket-to-dot 2026-08-12 20:49:52 -06:00
modules gen(llm): type-error triage (127 → 0 errors) 2026-08-12 20:49:52 -06:00
music Leon Devereux - Line Worlds Overture (#8277) 2026-07-14 19:14:49 +02:00
objects3d gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
recoil-lua-library@bd6ac7a1ad Update Lua libary submodule 2026-08-13 00:19:39 +00:00
scripts gen(llm): type-error triage (127 → 0 errors) 2026-08-12 20:49:52 -06:00
shaders gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
sidepics new logos (#7071) 2026-03-08 13:50:24 +01:00
singleplayer gen(bar_codemod): bracket-to-dot 2026-08-12 20:49:52 -06:00
sounds gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
spec gen(llm): type-error triage (127 → 0 errors) 2026-08-12 20:49:52 -06:00
tools removed unused AI's: Shard and STAI (#8004) 2026-06-19 12:56:33 +02:00
types env(llm): type GG and ffaStartPoints instead of suppressing 2026-08-12 20:49:52 -06:00
unitbasedefs clean air_rework_defs (#8740) 2026-08-14 22:38:54 +02:00
unitpics Remove the unfinished armminebomber (#8682) 2026-08-12 13:08:55 +02:00
units env(llm): type-check env layer — .emmyrc config, type stubs, manual fixes 2026-08-12 20:49:52 -06:00
unittextures remove air repair pads for real (#5881) 2025-10-15 17:17:04 +02:00
weapons gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
.busted env(llm): type-check env layer — .emmyrc config, type stubs, manual fixes 2026-08-12 20:49:52 -06:00
.editorconfig .editorconfig line endings (#4519) 2025-03-17 12:22:21 -04:00
.emmyrc.json env(llm): type-check env layer — .emmyrc config, type stubs, manual fixes 2026-08-12 20:49:52 -06: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 Enable luacheck on changed lines in pull requests (#8617) 2026-08-05 21:41:45 +03:00
.stylua.toml stylua: emit CRLF at 120 columns, matching the working tree 2026-08-12 20:49:52 -06:00
.styluaignore stylua: emit CRLF at 120 columns, matching the working tree 2026-08-12 20:49:52 -06: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.txt Naval aa stats made to match land counterparts (#8621) 2026-08-05 19:26:59 +02:00
cmdcolors_icexuick.txt selectionbox: made minimap selectionbox stylized as well (#6445) 2025-12-21 12:23:29 +01:00
CONTRIBUTING.md CONTRIBUTING.md: Add Lua 5.1 limits and file encoding guidance (#7341) 2026-04-04 19:05:34 +02:00
EngineOptions.lua gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06:00
init.lua gen(bar_codemod): detach-bar-modules 2026-08-12 20:49:52 -06: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 Updated some dead music credits links (#7271) 2026-03-30 16:31:11 +02: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
luaui.lua gen(stylua): initial formatting of entire codebase 2026-08-12 20:49:52 -06: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 placed mod options translations into I18N and made the gameinfo widget use it (#8767) 2026-08-16 21:25:09 +02:00
README.md Fix outdated engine url in README.md (#8722) 2026-08-12 11:24:21 +02: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 dev copy of the LUA code which is in BAR-install-directory/data/games/BAR.sdd.

  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 Luxs 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"
    }
],