From cd0c08dc7ce754473178ad3f32f7740a1dddc1eb Mon Sep 17 00:00:00 2001 From: Vaino Kauppila Date: Thu, 2 Jul 2026 22:58:25 +0300 Subject: Initial import: LibreForts (M0-M5 in progress) Open-source Forts clone: custom C++20 engine + data-driven (Lua) 2D physics artillery RTS. - Building: node/strut graph on a stiff mass-spring solver (canon Forts model), triangulation rigidity, axial + 30-degree angle-stress breaking, cascading collapse, fire (DoT + spread), ground destroys debris. - Weapons (M4): cannon (ballistic) + laser (beam/ignite) with select-and-aim-in- arc UX; splash / beam damage; bg-brace passthrough. - Devices + economy (M5): reactors + win/loss + restart, mines/turbines/battery, metal deposits, storage caps, per-shot energy cost. - Data-driven via Lua/sol2 with a layered mod loader; enemy-fort scenario mod. - Renderer: SDL3 + textures + ImGui dev UI. stb_image + ImGui vendored. - Assets: CC0 placeholders only; real game art loaded at runtime from the user's own install via forts: paths (bring-your-own; nothing copyrighted committed). See README.md / CLAUDE.md and research/ + requirements/ for detail. --- scripts/build.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 scripts/build.sh (limited to 'scripts/build.sh') diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..6027e75 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Build and run the Forts Clone inside a podman container. +# Usage: ./scripts/build.sh [--shell] + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +PROJECT_DIR="$(dirname "$SCRIPT_DIR")" +IMAGE_NAME="forts-clone-dev" + +cd "$PROJECT_DIR" + +# Build container image (cached) +echo "==> Building container image..." +podman build -t "$IMAGE_NAME" . + +if [ "${1:-}" = "--shell" ]; then + echo "==> Starting shell in container..." + exec podman run -it --rm \ + -v "$PROJECT_DIR":/src:Z \ + --userns=keep-id \ + "$IMAGE_NAME" \ + bash +else + echo "==> Configuring and building..." + podman run -it --rm \ + -v "$PROJECT_DIR":/src:Z \ + --userns=keep-id \ + "$IMAGE_NAME" \ + bash -c " + meson setup builddir \ + --buildtype=debugoptimized \ + -Dwarning_level=3 \ + -Dcpp_std=c++20 \ + --wipe + meson compile -C builddir -j$(nproc) + " + echo + echo "==> Build complete. Run with: ./builddir/forts-clone" +fi -- cgit v1.3