{"id":47783569,"url":"https://github.com/LBALab/lba2-classic-community","last_synced_at":"2026-04-18T18:01:48.881Z","repository":{"id":46296232,"uuid":"421054355","full_name":"LBALab/lba2-classic-community","owner":"LBALab","description":"Community-maintained source port of the original Little Big Adventure 2 (Twinsen’s Odyssey) engine.","archived":false,"fork":false,"pushed_at":"2026-04-18T15:38:01.000Z","size":8753,"stargazers_count":90,"open_issues_count":10,"forks_count":19,"subscribers_count":12,"default_branch":"main","last_synced_at":"2026-04-18T16:13:14.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LBALab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2021-10-25T14:18:04.000Z","updated_at":"2026-04-09T15:42:35.000Z","dependencies_parsed_at":"2025-09-17T00:25:21.978Z","dependency_job_id":null,"html_url":"https://github.com/LBALab/lba2-classic-community","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LBALab/lba2-classic-community","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LBALab%2Flba2-classic-community","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LBALab%2Flba2-classic-community/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LBALab%2Flba2-classic-community/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LBALab%2Flba2-classic-community/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LBALab","download_url":"https://codeload.github.com/LBALab/lba2-classic-community/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LBALab%2Flba2-classic-community/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31978808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T14:00:39.531Z","updated_at":"2026-04-18T18:01:48.854Z","avatar_url":"https://github.com/LBALab.png","language":"C++","funding_links":[],"categories":["Adventure"],"sub_categories":[],"readme":"# Little Big Adventure 2 - Engine source code - Community\n\nLittle Big Adventure 2 (aka Twinsen's Odyssey) is the sequel of Little Big Adventure (aka Relentless: Twinsen's Adventure) in 1997.\n\nWe are releasing this code with preservation in mind, as this piece of work was exceptional for the time and we believe it can be a valuable source of education.\n\nThe engine uses Assembly code and was originally compiled with non-open source libraries which have been excluded from the project.\n\n## About this repository\n\nThe **original** LBA2 engine source is the **lba2-classic** codebase: it is mostly assembly, with C++ for game logic, and is the canonical historical release. **lba2-classic-community** is a **community fork** for evolving and modernizing the code: ports of assembly to C++, SDL3, libsmacker, and other updates. The goal is to preserve the history and culture of the original while making the codebase easier to build and extend. See [ASM_TO_CPP_REFERENCE.md](docs/ASM_TO_CPP_REFERENCE.md) for which modules have been ported from ASM to C++ in this fork.\n\n## Quick start (running the game)\n\n### First clone\n\n1. **Dependencies:** CMake (3.23+), a C/C++ compiler, **SDL3**. The repo **`Makefile`** also expects **Ninja** on `PATH`. You can skip the Makefile and use plain CMake with your preferred generator instead.\n2. **`make`** or **`make help`** — lists convenience targets (`build`, `run`, `clean`, `test`, …).\n3. **`make build`** — configures `build/` (Ninja, Debug) and compiles `lba2`. Or: `cmake -B build \u0026\u0026 cmake --build build` (default generator is fine if you do not use `make build`).\n4. **Retail game data** are not in this repo. You need a directory that contains **`lba2.hqr`**. How you point the engine at it is **your choice**: `export LBA2_GAME_DIR=/path`, **`./data/`** (gitignored), **`--game-dir`**, or bounded automatic discovery — see [docs/GAME_DATA.md](docs/GAME_DATA.md). Nothing is “special-cased” except that marker file.\n5. **`make run`** or **`./scripts/dev/build-and-run.sh`** — build if needed, then run (exits with a clear message if no valid data directory was found).\n6. **`make test`** (alias for **`make test-discovery`**) — host-only tests for path resolution and embedded default config; **no** retail files or Docker required.\n\n**Windows:** Use **MSYS2** (recommended; see [docs/WINDOWS.md](docs/WINDOWS.md)). Discovery and the game work the same (`LBA2_GAME_DIR`, `--game-dir`, paths with `\\` or `/`). The root **`Makefile`** and **`scripts/dev/*.sh`** need a **Unix-like shell** (MSYS2 UCRT64, Git Bash, or WSL); alternatively run **`cmake`** and **`build/SOURCES/lba2.exe`** from **cmd.exe** / PowerShell and set the env var with `set LBA2_GAME_DIR=...`.\n\n### Build and run (reference)\n\n```bash\ncmake -B build \u0026\u0026 cmake --build build\n./build/SOURCES/lba2\n```\n\nWith optional game data path: `./build/SOURCES/lba2 --game-dir /path/to/classic/install` or set **`LBA2_GAME_DIR`** first.\n\n**`make run`** sets **`LBA2_GAME_DIR`** automatically if **`./data`** or **`../LBA2`** contains `lba2.hqr`.\n\nRun **`make`** for convenience targets: **`make build`**, **`make clean`** (removes the default **`build/`** tree; override with **`BUILD_DIR`**), **`make test`**, **`make test-docker`**, etc.\n\n## Prerequisites\n\n- **CMake** 3.23 or later\n- **Ninja** build system for CMake preset-based builds\n- **UASM** assembler (used for x86 assembly sources)\n- **SDL3** (shared library)\n- A C/C++ compiler with C++98 support (GCC, Clang)\n\nOn macOS, install Ninja with:\n\n```bash\nbrew install ninja\n```\n\n## Building\n\n```bash\ncmake -B build\ncmake --build build\n```\n\nBy default, the build uses SDL for audio and libsmacker for FMV playback. Override with `-DSOUND_BACKEND=null -DMVIDEO_BACKEND=null` for a minimal (silent, no video) build.\n\n### Using CMake presets\n\nThis repository provides CMake presets for common configurations in `CMakePresets.json`. You can use them instead of specifying the build directory and toolchain flags manually:\n\nAll presets use the `Ninja` generator, so `ninja` must be installed and\navailable on `PATH`.\n\n- **Linux (native build)**:\n\n  ```bash\n  cmake --preset linux\n  cmake --build --preset linux\n  ```\n\n- **macOS (native build)**:\n\n  ```bash\n  cmake --preset macos_arm64   # or macos_x86_64\n  cmake --build --preset macos_arm64\n  ```\n\n- **Windows (native build with MSYS2)** - See [docs/WINDOWS.md](docs/WINDOWS.md) for detailed instructions:\n\n  ```bash\n  cmake --preset windows_ucrt64    # recommended for Windows 10+\n  cmake --build --preset windows_ucrt64\n  ```\n\n- **Cross-compiling Windows from Linux**:\n\n  ```bash\n  cmake --preset cross_linux2win\n  cmake --build --preset cross_linux2win\n  ```\n\n### Build Options\n\n| Option | Values | Default | Description |\n|--------|--------|---------|-------------|\n| `SOUND_BACKEND` | `null`, `miles`, `sdl` | `sdl` | Sound backend. Use `sdl` for audio via SDL3. `miles` requires the proprietary Miles Sound System SDK. See [docs/AUDIO.md](docs/AUDIO.md). |\n| `MVIDEO_BACKEND` | `null`, `smacker` | `smacker` | Motion video backend. Use `smacker` for FMV playback via the bundled open-source libsmacker. |\n| `DEBUG_TOOLS` | `ON`, `OFF` | `OFF` | Enable original Adeline developer debug tools. See [docs/DEBUG.md](docs/DEBUG.md). |\n| `CONSOLE_MODULE` | `ON`, `OFF` | `OFF` | Enable Quake-style debug console (backtick/F12). See [docs/CONSOLE.md](docs/CONSOLE.md). |\n| `LBA2_BUILD_TESTS` | `ON`, `OFF` | `OFF` | Build CTest targets (ASM equivalence + host tests such as `test_res_discovery`). |\n| `LBA2_BUILD_ASM_EQUIV_TESTS` | `ON`, `OFF` | `ON` | ASM↔CPP equivalence suite (needs `objcopy`). Set `OFF` for host-only `test_res_discovery` (e.g. macOS CI, `make test-discovery`). |\n\nWhen `MVIDEO_BACKEND` is set to `smacker`, the build links in `libsmacker` and the FMV player. Video audio routes through the active sound backend (SDL: real audio; NULL/MILES: silent). See `LIB386/SMACKER/README.md` and `LIB386/AIL/MILES/README.md` for details on the proprietary SDKs and their open-source replacements.\n\n### Debug Tools\n\nTo build with the original Adeline developer debug tools enabled:\n\n```bash\ncmake -B build -DDEBUG_TOOLS=ON\ncmake --build build\n```\n\nThis enables keyboard shortcuts for debugging (debug overlay, FPS counter, screenshots, collision visualization, benchmarks), cheat codes, bug save/load system, and command-line scene selection. See [docs/DEBUG.md](docs/DEBUG.md) for full documentation.\n\n### Cross-compiling for Windows (from Linux)\n\nA MinGW toolchain file is provided for cross-compiling a 32-bit Windows build from Linux:\n\n```bash\ncmake -B build -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-w64-i686.cmake\ncmake --build build\n```\n\n## Project Structure\n\n```\nlba2-classic-community/\n├── CMakeLists.txt            # Root build configuration\n├── cmake/                    # Cross-compilation toolchain files\n├── SOURCES/                  # Main game logic\n│   ├── 3DEXT/                # 3D extensions (terrain, sky, rain, decor rendering)\n│   ├── CONFIG/               # Configuration and key binding\n│   └── *.CPP, *.H, *.ASM    # Game modules (AI, physics, inventory, save/load, etc.)\n├── LIB386/                   # Engine libraries\n│   ├── 3D/                   # 3D math (projection, rotation, matrices)\n│   ├── AIL/                  # Audio abstraction layer (SDL, Miles, or null backends)\n│   ├── ANIM/                 # Animation system\n│   ├── FILEIO/               # File I/O\n│   ├── libsmacker/           # Open-source Smacker video decoder (LGPL 2.1)\n│   ├── OBJECT/               # 3D object display\n│   ├── pol_work/             # Polygon rendering (flat, gouraud, textured)\n│   ├── SVGA/                 # Graphics / sprite scaling\n│   ├── SYSTEM/               # System abstraction\n│   └── H/                    # Shared headers\n└── docs/                     # Additional documentation\n```\n\n## Documentation\n\n**Engine reference** (terms, lifecycles, scene index): [GLOSSARY](docs/GLOSSARY.md), [LIFECYCLES](docs/LIFECYCLES.md), [SCENES](docs/SCENES.md).\n\nBuild, debug, preservation, and porting docs are in [docs/](docs/README.md).\n\n## Preservation Notes\n\nThis codebase is a window into 1990s game development at Adeline Software International in Lyon, France. Beyond the technical content, the source files contain original developer artifacts worth exploring. The ASCII art and French comments documented below are from the **original** Adeline / lba2-classic codebase (same files or content preserved when porting ASM to C++ in this fork).\n\n- **ASCII art banners** -- The developers decorated their source files with elaborate text banners in two distinct styles. See [ASCII_ART.md](docs/ASCII_ART.md) for a full catalog.\n- **French comments** -- The code is written with French comments throughout, many of which are informal, humorous, or expressive in ways that reflect the personality of the team. See [FRENCH_COMMENTS.md](docs/FRENCH_COMMENTS.md) for a curated selection with English translations.\n\n## Licence\n\nThis source code is licensed under the [GNU General Public License](https://github.com/2point21/lba2-classic-community/blob/main/LICENSE).\n\nPlease note this license only applies to **Little Big Adventure 2** engine source code. **Little Big Adventure 2** game assets (art, models, textures, audio, etc.) are not open-source and therefore aren't redistributable.\n\n## How can I contribute?\n\nRead our [Contribution Guidelines](https://github.com/2point21/lba2-classic-community/blob/main/CONTRIBUTING.md).\n\n## Links\n\n**Official Website:** https://twinsenslittlebigadventure.com/\n\n**Discord:** https://discord.gg/gfzna5SfZ5\n\n**Docs:** https://lba-classic-doc.readthedocs.io/\n\n## Buy the game\n\n[[GoG]](https://www.gog.com/game/little_big_adventure_2)  [[Steam]](https://store.steampowered.com/app/398000/Little_Big_Adventure_2/)\n\n## Original Dev Team\n\nDirection: Frédérick Raynal\n\nProgrammers: Sébastien Viannay / Laurent Salmeron / Cédric Bermond / Frantz Cournil / Marc Bureau du Colombier\n\n3D Artists \u0026 Animations: Paul-Henri Michaud / Arnaud Lhomme\n\nArtists: Yaeël Barroz, Sabine Morlat, Didier Quentin\n\nStory \u0026 Design: Frédérick Raynal / Didier Chanfray / Yaël Barroz / Laurent Salmeron / Marc Albinet\n\nDialogs: Marc Albinet\n\nStory coding: Frantz Cournil / Lionel Chaze / Pascal Dubois\n\nVideo Sequences: Frédéric Taquet / Benoît Boucher / Ludovic Rubin / Merlin Pardot\n\nMusic \u0026 Sound FX: Philippe Vachey\n\nTesting: Bruno Marion / Thomas Ferraz / Alexis Madinier / Christopher Horwood / Bertrand Fillardet\n\nQuality Control: Emmanuel Oualid\n\n## Copyright\n\nThe intellectual property is currently owned by [2.21]. Copyright [2.21]\n\nOriginally developed by Adeline Software International in 1994\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLBALab%2Flba2-classic-community","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLBALab%2Flba2-classic-community","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLBALab%2Flba2-classic-community/lists"}