# LibreForts Open-source clone of Forts, a 2D physics artillery RTS. Custom C++ engine, content driven by Lua. Work in progress. See CLAUDE.md for details. ## Stack C++20, Meson/Ninja, SDL3, Dear ImGui, a custom mass-spring physics solver, Lua 5.4 with sol2, and stb_image. Box2D is linked but idle; bgfx, SoLoud, ENet and EnTT are planned but not yet wired up. ## Build and run ### Container (reproducible, any distro) ```sh podman build -t forts-clone-dev . podman run --rm -v "$PWD":/src:Z --userns=keep-id localhost/forts-clone-dev:latest \ sh -c "cd /src && meson setup builddir && meson compile -C builddir" ./builddir/forts-clone # run from repo root ``` The container builds every dependency into `/usr/local` and links Lua statically, so the resulting binary runs on any host. You still run it on the host (it needs the host's SDL3 and a display). ### Local (Arch Linux) `meson.build` falls back to system packages, so a native build only needs the libraries the code actually uses. bgfx, SoLoud, ENet and EnTT are part of the planned stack but not yet wired up, so they are not required to build. ```sh # repo packages sudo pacman -S --needed meson ninja gcc pkgconf sdl3 lua54 glm box2d # sol2 (header-only Lua bindings) from the AUR, e.g. with an AUR helper paru -S sol2 # or: yay -S sol2 meson setup builddir meson compile -C builddir ./builddir/forts-clone # run from repo root ``` Native builds link Lua dynamically against the system `lua54`, which is fine when you build and run on the same machine. ### Removing the container image ```sh podman rmi localhost/forts-clone-dev:latest # drop the dev image podman image prune -f # drop dangling build layers rm -rf builddir # meson dir, reconfigure after ``` ## Assets The repo ships CC0 placeholders only. If you own Forts, real textures load at runtime from your install via `forts:` paths (set `$FORTS_DATA`). Nothing copyrighted is stored here. Forts is copyright EarthWork Games.