├── .github ├── dependabot.yml └── workflows │ ├── ci.yml │ └── pages.yml ├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── LICENSE_just-the-docs ├── README.md ├── _config.yml ├── assets ├── aitd1-model.png ├── aitd1.png ├── bench-iso.png ├── bench-sprite.png ├── lba1-model.png ├── lba1-sendell.png ├── lba1.png ├── lba1street.gif ├── lba2-lighthouse.png ├── lba2-model.png ├── lba2-outside.jpeg ├── tico-menu.jpg ├── tico-prerendermotion.gif └── tico.jpg └── docs ├── compilation ├── index.md └── lba1 │ ├── alternative.md │ └── index.md ├── game-engine ├── images.md ├── index.md └── scenes │ ├── index.md │ ├── scripting.md │ └── zones.md ├── index.md └── useful-links.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: bundler 4 | directory: / 5 | schedule: 6 | interval: daily 7 | allow: 8 | - dependency-type: direct 9 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: ["main"] 6 | pull_request: 7 | 8 | jobs: 9 | # Build job 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v4 15 | 16 | - name: Setup Ruby 17 | uses: ruby/setup-ruby@v1 18 | with: 19 | ruby-version: '3.3' # Not needed with a .ruby-version file 20 | bundler-cache: false # runs 'bundle install' and caches installed gems automatically 21 | 22 | - name: Install bundle and jeckyll 23 | run: gem install jekyll bundler 24 | 25 | - name: Install dependencies 26 | run: bundle install 27 | 28 | - name: Build with Jekyll 29 | run: bundle exec jekyll build 30 | -------------------------------------------------------------------------------- /.github/workflows/pages.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # Sample workflow for building and deploying a Jekyll site to GitHub Pages 7 | name: Deploy Jekyll site to Pages 8 | 9 | on: 10 | push: 11 | branches: ["main"] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 17 | permissions: 18 | contents: read 19 | pages: write 20 | id-token: write 21 | 22 | # Allow one concurrent deployment 23 | concurrency: 24 | group: "pages" 25 | cancel-in-progress: true 26 | 27 | jobs: 28 | # Build job 29 | build: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v4 34 | 35 | - name: Setup Ruby 36 | uses: ruby/setup-ruby@v1 37 | with: 38 | ruby-version: '3.3' # Not needed with a .ruby-version file 39 | bundler-cache: false # runs 'bundle install' and caches installed gems automatically 40 | 41 | - name: Setup Pages 42 | id: pages 43 | uses: actions/configure-pages@v5 44 | 45 | - name: Install bundle and jeckyll 46 | run: gem install jekyll bundler 47 | 48 | - name: Install dependencies 49 | run: bundle install 50 | 51 | - name: Build with Jekyll 52 | # Outputs to the './_site' directory by default 53 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" 54 | env: 55 | JEKYLL_ENV: production 56 | 57 | - name: Upload artifact 58 | # Automatically uploads an artifact from the './_site' directory by default 59 | uses: actions/upload-pages-artifact@v3 60 | 61 | # Deployment job 62 | deploy: 63 | environment: 64 | name: github-pages 65 | url: ${{ steps.deployment.outputs.page_url }} 66 | runs-on: ubuntu-latest 67 | needs: build 68 | steps: 69 | - name: Deploy to GitHub Pages 70 | id: deployment 71 | uses: actions/deploy-pages@v4 72 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | .vscode 3 | 4 | # Ignore the default location of the built site, and caches and metadata generated by Jekyll 5 | _site/ 6 | .sass-cache/ 7 | .jekyll-cache/ 8 | .jekyll-metadata 9 | 10 | # Ignore folders generated by Bundler 11 | .bundle/ 12 | vendor/ -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem "jekyll", "~> 4.3.4" # installed by `gem jekyll` 4 | # gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2 5 | 6 | gem "just-the-docs", "0.10.0" # pinned to the current release 7 | # gem "just-the-docs" # always download the latest release 8 | 9 | gem "jekyll-github-metadata", ">= 2.15" 10 | 11 | gem "jekyll-include-cache", group: :jekyll_plugins 12 | gem "jekyll-sitemap", group: :jekyll_plugins 13 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.7) 5 | public_suffix (>= 2.0.2, < 7.0) 6 | base64 (0.2.0) 7 | colorator (1.1.0) 8 | concurrent-ruby (1.3.4) 9 | em-websocket (0.5.3) 10 | eventmachine (>= 0.12.9) 11 | http_parser.rb (~> 0) 12 | eventmachine (1.2.7) 13 | faraday (2.8.1) 14 | base64 15 | faraday-net_http (>= 2.0, < 3.1) 16 | ruby2_keywords (>= 0.0.4) 17 | faraday-net_http (3.0.2) 18 | ffi (1.17.0-x86_64-darwin) 19 | forwardable-extended (2.6.0) 20 | google-protobuf (3.23.4-x86_64-darwin) 21 | http_parser.rb (0.8.0) 22 | i18n (1.14.6) 23 | concurrent-ruby (~> 1.0) 24 | jekyll (4.3.4) 25 | addressable (~> 2.4) 26 | colorator (~> 1.0) 27 | em-websocket (~> 0.5) 28 | i18n (~> 1.0) 29 | jekyll-sass-converter (>= 2.0, < 4.0) 30 | jekyll-watch (~> 2.0) 31 | kramdown (~> 2.3, >= 2.3.1) 32 | kramdown-parser-gfm (~> 1.0) 33 | liquid (~> 4.0) 34 | mercenary (>= 0.3.6, < 0.5) 35 | pathutil (~> 0.9) 36 | rouge (>= 3.0, < 5.0) 37 | safe_yaml (~> 1.0) 38 | terminal-table (>= 1.8, < 4.0) 39 | webrick (~> 1.7) 40 | jekyll-github-metadata (2.16.1) 41 | jekyll (>= 3.4, < 5.0) 42 | octokit (>= 4, < 7, != 4.4.0) 43 | jekyll-include-cache (0.2.1) 44 | jekyll (>= 3.7, < 5.0) 45 | jekyll-sass-converter (3.0.0) 46 | sass-embedded (~> 1.54) 47 | jekyll-seo-tag (2.8.0) 48 | jekyll (>= 3.8, < 5.0) 49 | jekyll-sitemap (1.4.0) 50 | jekyll (>= 3.7, < 5.0) 51 | jekyll-watch (2.2.1) 52 | listen (~> 3.0) 53 | just-the-docs (0.10.0) 54 | jekyll (>= 3.8.5) 55 | jekyll-include-cache 56 | jekyll-seo-tag (>= 2.0) 57 | rake (>= 12.3.1) 58 | kramdown (2.4.0) 59 | rexml 60 | kramdown-parser-gfm (1.1.0) 61 | kramdown (~> 2.0) 62 | liquid (4.0.4) 63 | listen (3.9.0) 64 | rb-fsevent (~> 0.10, >= 0.10.3) 65 | rb-inotify (~> 0.9, >= 0.9.10) 66 | mercenary (0.4.0) 67 | octokit (4.25.1) 68 | faraday (>= 1, < 3) 69 | sawyer (~> 0.9) 70 | pathutil (0.16.2) 71 | forwardable-extended (~> 2.6) 72 | public_suffix (5.1.1) 73 | rake (13.2.1) 74 | rb-fsevent (0.11.2) 75 | rb-inotify (0.11.1) 76 | ffi (~> 1.0) 77 | rexml (3.3.8) 78 | rouge (3.30.0) 79 | ruby2_keywords (0.0.5) 80 | safe_yaml (1.0.5) 81 | sass-embedded (1.58.3-x86_64-darwin) 82 | google-protobuf (~> 3.21) 83 | sawyer (0.9.2) 84 | addressable (>= 2.3.5) 85 | faraday (>= 0.17.3, < 3) 86 | terminal-table (3.0.2) 87 | unicode-display_width (>= 1.1.1, < 3) 88 | unicode-display_width (2.6.0) 89 | webrick (1.8.2) 90 | 91 | PLATFORMS 92 | x86_64-darwin-23 93 | 94 | DEPENDENCIES 95 | jekyll (~> 4.3.4) 96 | jekyll-github-metadata (>= 2.15) 97 | jekyll-include-cache 98 | jekyll-sitemap 99 | just-the-docs (= 0.10.0) 100 | 101 | BUNDLED WITH 102 | 2.4.22 103 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LBA Lab - A hub for Little Big Adventure community creations 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE_just-the-docs: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 just-the-docs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lba-engine-architecture 2 | Little Big Adventure series Engine Architecture documentation community-driven 3 | 4 | [Live Documentation](https://lbalab.github.io/lba-engine-architecture/) 5 | 6 | ## Introduction 7 | 8 | The Little Big Adventure Series Engine Architecture is a project to document and teach how Adeline Software International implement their games, including Little Big Adventure 1 (Relentless: Twinsen's Adventure), Little Big Adventure 2 (Twinsen's Odyssey) and Time Commando. 9 | 10 | This documentation will refer to the engines open-sourced and reimplemented by the community, such as [lba1-classic-community](https://github.com/LBALab/lba1-classic-community), [lba2-classic-community](https://github.com/LBALab/lba2-classic-community), [twin-e](https://github.com/LBALab/twin-e), [twine ScummVM](https://github.com/scummvm/scummvm/tree/master/engines/twine). 11 | 12 | ## Copyright 13 | The intellectual property is currently owned by [2.21]. Copyright [2.21] 14 | 15 | Originaly developed by Adeline Software International in 1994 (LBA1), Time Commando (1996) and LBA2 (1997). 16 | 17 | ### Licence 18 | This documentation is licensed under MIT. 19 | 20 | The source code for both games that has been release by [2.21] has been licensed under the GNU General Public License. 21 | 22 | Please note theses licenses do not apply to Little Big Adventure 1 & 2 or Time Commando game assets (art, models, textures, audio, etc.) are not open-sourced and therefore aren't redistributable. 23 | 24 | 25 | 26 | ## Get Started 27 | 28 | ### How can I contribute 29 | 30 | Fork the projct to your own repository, make your changes and submit a pull request. If you are not familiar with git you can try editing the files directly on GitHub or drop us a message on Discord. 31 | 32 | If you need help to get you started with this project, you can join us on [Discord](https://discord.gg/gfzna5SfZ5). 33 | 34 | ### Install Jekyll and Bundler 35 | 36 | If you don't have Jekyll installed, you can install it by running the following command: 37 | 38 | ```bash 39 | gem update --system 40 | gem install jekyll bundler 41 | ``` 42 | 43 | ### Building and previewing your site locally 44 | 45 | Assuming [Jekyll] and [Bundler] are installed on your computer: 46 | 47 | 1. Change your working directory to the root directory of your site. 48 | 49 | 2. Run `bundle install`. 50 | 51 | 3. Run `bundle exec jekyll serve --watch` to build your site and preview it at `localhost:4000`. 52 | 53 | The built site is stored in the directory `_site`. 54 | 55 | Once changes are commited to the repository, the site will be automatically built and deployed to GitHub Pages under the URL: https://lbalab.github.io/lba-engine-architecture/ 56 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: LBA Engine Architecture 2 | description: The Little Big Adventure Series Engine Architecture is a project to document and teach how Adeline Software International implement their games, including Little Big Adventure 1 (Relentless Twinsen's Adventure), Little Big Adventure 2 (Twinsen's Odyssey) and Time Commando. 3 | theme: just-the-docs 4 | 5 | url: https://lbalab.github.io/lba-engine-architecture 6 | 7 | aux_links: 8 | LBA1: https://github.com/LBALab/lba1-classic-community 9 | LBA2: https://github.com/LBALab/lba2-classic-community 10 | twine ScummVM: https://github.com/scummvm/scummvm/tree/master/engines/twine 11 | File Info: http://lbafileinfo.kaziq.net/index.php/Main_Page 12 | Metadata: https://github.com/lbalab/metadata 13 | 14 | permalink: pretty 15 | 16 | color_scheme: dark 17 | 18 | defaults: 19 | - scope: 20 | path: "docs" 21 | type: "pages" 22 | values: 23 | layout: "default" 24 | 25 | exclude: 26 | - archived/ 27 | - _site/ 28 | - .github/ 29 | - .jekyll-cache/ 30 | - .vscode/ 31 | - gemfiles/ 32 | - Gemfile 33 | - Gemfile.lock 34 | - "*.gemspec" 35 | - "*.gem" 36 | - .gitignore 37 | - LICENSE 38 | - LICENSE_just-the-docs 39 | - README.md 40 | 41 | search_enabled: true 42 | search: 43 | # Split pages into sections that can be searched individually 44 | # Supports 1 - 6, default: 2 45 | heading_level: 3 46 | # Maximum amount of previews per search result 47 | # Default: 3 48 | previews: 2 49 | # Maximum amount of words to display before a matched word in the preview 50 | # Default: 5 51 | preview_words_before: 3 52 | # Maximum amount of words to display after a matched word in the preview 53 | # Default: 10 54 | preview_words_after: 3 55 | # Set the search token separator 56 | # Default: /[\s\-/]+/ 57 | # Example: enable support for hyphenated search words 58 | tokenizer_separator: /[\s/]+/ 59 | # Display the relative url in search results 60 | # Supports true (default) or false 61 | rel_url: true 62 | # Enable or disable the search button that appears in the bottom right corner of every page 63 | # Supports true or false (default) 64 | button: false 65 | # Focus the search input by pressing `ctrl + focus_shortcut_key` (or `cmd + focus_shortcut_key` on macOS) 66 | focus_shortcut_key: "k" 67 | 68 | enable_copy_code_button: true 69 | 70 | mermaid: 71 | # Version of mermaid library 72 | # Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/ 73 | version: "9.1.6" 74 | # Put any additional configuration, such as setting the theme, in _includes/mermaid_config.js 75 | # See also docs/ui-components/code 76 | # To load mermaid from a local library, also use the `path` key to specify the location of the library; e.g. 77 | # for (v10+): 78 | # path: "/assets/js/mermaid.esm.min.mjs" 79 | # for (' 99 | 100 | # Footer last edited timestamp 101 | last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter 102 | last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html 103 | 104 | # Footer "Edit this page on GitHub" link text 105 | gh_edit_link: true # show or hide edit this page link 106 | gh_edit_link_text: "Edit this page on GitHub" 107 | gh_edit_repository: "https://github.com/lbalab/lba-engine-architecture" # the github URL for your repo 108 | gh_edit_branch: "main" # the branch that your docs is served from 109 | # gh_edit_source: docs # the source that your files originate from 110 | gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately 111 | 112 | callouts_level: quiet # or loud 113 | callouts: 114 | highlight: 115 | color: yellow 116 | important: 117 | title: Important 118 | color: blue 119 | new: 120 | title: New 121 | color: green 122 | note: 123 | title: Note 124 | color: purple 125 | warning: 126 | title: Warning 127 | color: red 128 | 129 | ga_tracking: G-NBEDMN6YZC 130 | ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default) 131 | 132 | plugins: 133 | - jekyll-seo-tag 134 | - jekyll-github-metadata 135 | - jekyll-include-cache 136 | - jekyll-sitemap 137 | 138 | kramdown: 139 | syntax_highlighter_opts: 140 | block: 141 | line_numbers: false 142 | 143 | compress_html: 144 | clippings: all 145 | comments: all 146 | endings: all 147 | startings: [] 148 | blanklines: false 149 | profile: false 150 | # ignore: 151 | # envs: all 152 | -------------------------------------------------------------------------------- /assets/aitd1-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/aitd1-model.png -------------------------------------------------------------------------------- /assets/aitd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/aitd1.png -------------------------------------------------------------------------------- /assets/bench-iso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/bench-iso.png -------------------------------------------------------------------------------- /assets/bench-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/bench-sprite.png -------------------------------------------------------------------------------- /assets/lba1-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba1-model.png -------------------------------------------------------------------------------- /assets/lba1-sendell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba1-sendell.png -------------------------------------------------------------------------------- /assets/lba1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba1.png -------------------------------------------------------------------------------- /assets/lba1street.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba1street.gif -------------------------------------------------------------------------------- /assets/lba2-lighthouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba2-lighthouse.png -------------------------------------------------------------------------------- /assets/lba2-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba2-model.png -------------------------------------------------------------------------------- /assets/lba2-outside.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/lba2-outside.jpeg -------------------------------------------------------------------------------- /assets/tico-menu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/tico-menu.jpg -------------------------------------------------------------------------------- /assets/tico-prerendermotion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/tico-prerendermotion.gif -------------------------------------------------------------------------------- /assets/tico.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LBALab/lba-engine-architecture/5fb0b3274cc787422608b00b8e4730e9549b6866/assets/tico.jpg -------------------------------------------------------------------------------- /docs/compilation/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Compile 3 | 4 | --- 5 | 6 | # Compile 7 | 8 | This section will guide you through the process of compiling the Little Big Adventure games. 9 | 10 | -------------------------------------------------------------------------------- /docs/compilation/lba1/alternative.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: LBA1 DOS Alternative 3 | parent: LBA1 DOS 4 | permalink: /compilation/lba1/alternative 5 | --- 6 | 7 | # Prerequisites 8 | 9 | - [DOSBox](https://www.dosbox.com/) - DOS emulator which we will use 10 | to compile the game inside. 11 | - [4DOS](https://www.4dos.info/v4dos.htm#751) - Command line 12 | interpreter, which supports the `copy` command with binary inputs 13 | and output. 14 | - Watcom 10 compiler - For compiling C sources and running MAKEFILEs 15 | - MASM (Microsoft Macro Assembler) 6.0 - For compiling ASM sources 16 | 17 | # Getting prerequisites and sources 18 | 19 | DOSBox and 4DOS are freely available. For getting Watcom 10 and MASM 20 | 6.0, you need to search the internet. Note that we did not manage to 21 | build the game with Open Watcom. Also, for some reason the MASM version 22 | 6.11 compiler did run very slowly in the DOSBox, so it was basically 23 | unusable. We had to use the version 6.0. 24 | 25 | All directories and files will placed in the `~/lba-hacking` directory 26 | on the host machine. Feel free to change this path, but then adjust the 27 | DOSBox configuration below correspondingly. This directory will be 28 | mounted to `C:` in DOSBox. 29 | 30 | - Extract 4DOS into `4dos`. 31 | - Extract Watcom and MASM installers into `install`. These will be 32 | needed to be installed. 33 | - Clone into 34 | `lba`. 35 | 36 | The dir structure at this point should like something like this: 37 | 38 | ~/lba-hacking 39 | ├── 4dos 40 | ├── install 41 | │ ├── masm 42 | │ └── watcom 43 | └── lba 44 | 45 | # DOSBox configuration 46 | 47 | Change the `autoexec` section of you DOSBox configuration like below. 48 | The configuration path of DOSBox is usually shown when you start it. 49 | ``` 50 | [autoexec] 51 | mount C ~/lba-hacking 52 | 53 | PATH c:\watcom\binw;c:\masm\bin;%PATH% 54 | set INCLUDE=c:\watcom\h;c:\lba\lib386 55 | set WATCOM=c:\watcom 56 | set EDPATH=c:\watcom\eddat 57 | set WIPFC=c:\watcom\wipfc 58 | 59 | C: 60 | C:\4DOS\4DOS.COM 61 | ``` 62 | 63 | # Install tools 64 | 65 | - Launch DOSBox (e.g. with `dosbox`). 66 | - On the first run, 4DOS will prompt some configuration values. 67 | - Install Watcom by running `C:\INSTALL\WATCOM\SETUP.EXE` and 68 | following the instructions. Leave the default installation path 69 | `C:\WATCOM`. The step which proposes to modify `AUTOEXEC.EXE` and 70 | `CONFIG.SYS` can be skipped. 71 | - Install MASM by running `C:\INSTALL\MASM\DISK1\SETUP.EXE`. Leave the 72 | default installation paths `C:\MASM\BINB`, etc\... 73 | 74 | Check the installation by typing in: 75 | 76 | - `wmake`: this should show the installed Watcom make version; in my 77 | case 10.5 78 | - `wcc386`: this should show the help of the Watcom C compiler; in my 79 | case 10.5 80 | - `ml`: this should show the version of the Microsoft Macro Assembler; 81 | in my case 6.00 82 | 83 | Now we are ready to build the game. 84 | 85 | # Build 86 | 87 | Run inside the DOSBox 88 | ``` 89 | cd C:\LBA\LIB386 90 | cd LIB_3D 91 | wmake 92 | cd ..\LIB_MENU 93 | wmake 94 | cd ..\LIB_MIDI 95 | wmake 96 | cd ..\LIB_MIX 97 | wmake 98 | cd ..\LIB_SAMP 99 | wmake 100 | cd ..\LIB_SVGA 101 | wmake 102 | cd ..\LIB_SYS 103 | wmake 104 | cd ..\..\SOURCES 105 | wmake 106 | link 107 | ``` 108 | 109 | The last command will link the `LBA0.exe`. 110 | 111 | # Run 112 | 113 | To run the game, you will need some assets of the original game. 114 | 115 | - copy HQR files, 116 | - copy `M_SB16.DLL`, `S3.DLL`, and `W_SB16.DLL`, 117 | - copy `LBA.CFG`, 118 | 119 | into the directory containing `LBA0.exe`, in our case `C:\LBA\SOURCES`. 120 | 121 | Run 122 | 123 | dos4gw LBA0.exe 124 | 125 | Enjoy! 126 | -------------------------------------------------------------------------------- /docs/compilation/lba1/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: LBA1 DOS 3 | parent: Compile 4 | permalink: /compilation/lba1 5 | --- 6 | 7 | # LBA1 Compilation for DOS using Open Watcom 8 | 9 | ## Prerequisites 10 | 11 | - [Open Watcom 12 | v2](https://github.com/open-watcom/open-watcom-v2) - C/C++ 13 | Compiler capable of building DOS applications 14 | - MASM (Microsoft Macro Assembler) - For compiling assembler files 15 | 16 | ## Getting prerequisites and sources 17 | 18 | The prerequisites are freely available, MASM as part of [Visual Studio 19 | Community](https://visualstudio.microsoft.com/pt-br/vs/community/) 20 | (Tested with versions 2019 and 2022). Both can be installed at their 21 | default locations. 22 | 23 | For Open Watcom, be sure to select full installation and to modify 24 | environment variables later. 25 | 26 | To get the sources, clone the [lba1-classic-community 27 | repository](https://github.com/2point21/lba1-classic-community) into 28 | some folder. 29 | 30 | ```sh 31 | git clone https://github.com/2point21/lba-classic-doc.git 32 | ``` 33 | 34 | - [Open Watcom v2](https://github.com/open-watcom/open-watcom-v2) - 35 | C/C++ Compiler capable of building DOS applications 36 | - [MASM (Microsoft Macro Assembler)]{.title-ref} - For compiling 37 | assembler files 38 | 39 | # Getting prerequisites and sources 40 | 41 | The prerequisites are freely available, MASM as part of [Visual Studio 42 | Community](https://visualstudio.microsoft.com/pt-br/vs/community/) 43 | (Tested with versions 2019 and 2022). Both can be installed at their 44 | default locations. 45 | 46 | For Open Watcom, be sure to select full instalation and to modify 47 | environment variables later. 48 | 49 | To get the sources, clone the [lba1-classic-community 50 | repository](https://github.com/2point21/lba1-classic-community) into 51 | some folder. 52 | 53 | ```sh 54 | git clone https://github.com/2point21/lba-classic-doc.git 55 | ``` 56 | 57 | # Environment configuration 58 | 59 | Create or edit the file `SETENV.BAT` on the `lba1-classic-community` 60 | repository folder, with the following content, making sure to double 61 | check if the Microsoft Visual Studio Community and Open Watcom folders 62 | are the same on your system. 63 | 64 | ```bat 65 | @echo off 66 | echo LBA Build Environment 67 | call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat" 68 | call C:\WATCOM\owsetenv.bat 69 | SET LIB386_PATH=%CD%\LIB386 70 | SET INCLUDE=%LIB386_PATH%;%INCLUDE% 71 | ``` 72 | 73 | # Build 74 | 75 | In a Windows command prompt inside the `lba1-classic-community` 76 | repository folder, run 77 | 78 | ```bat 79 | cd LIB386\LIB_3D 80 | wmake 81 | cd ..\LIB_CD 82 | wmake 83 | cd ..\LIB_MENU 84 | wmake 85 | cd ..\LIB_MIDI 86 | wmake 87 | cd ..\LIB_MIX 88 | wmake 89 | cd ..\LIB_SAMP 90 | wmake 91 | cd ..\LIB_SVGA 92 | wmake 93 | cd ..\LIB_SYS 94 | wmake 95 | cd ..\..\SOURCES 96 | wmake 97 | link 98 | ``` 99 | 100 | The expected output is the `LBA0.exe` executable inside the SOURCES 101 | folder. 102 | 103 | # Run 104 | 105 | To run the game, you will need the original assets of the game and the 106 | `LBA0.exe` generated executable. 107 | 108 | - copy game assets, 109 | - copy `LBA0.exe`, 110 | 111 | into the same directory. The compiled file was verified to run with 112 | [DOSBox Staging](https://dosbox-staging.github.io/). 113 | 114 | # Troubleshooting 115 | 116 | *Q: When I execute LBA0.exe, an error appears: \"SVGA card BIOS does not 117 | support VESA extensions. Please refer to your SVGA card documentation 118 | for installing VESA driver\". What can I do?* 119 | 120 | A: To solve this, change the SvgaDriver configuration in LBA.CFG to: 121 | 122 | SvgaDriver: TSENG.DLL 123 | 124 | Where TSENG.DLL is set instead of S3.DLL. If the issue persists, other 125 | drivers may be used (check LBA.CFG to see which are available in the 126 | game assets). As of date, this was tested using Tseng. 127 | 128 | Additionally, change the type of machine DOSBox tries to emulate. In the 129 | DOSBox configuration file, set the machine value to: 130 | 131 | ``` 132 | [dosbox] 133 | machine=svga_et4000 134 | ``` 135 | 136 | This will change the emulation of DOSBox to Tseng Labs ET4000. If you 137 | choose to use another SVGA driver, change the machine value accordingly 138 | (check the DOSBox configuration file to see the available options). 139 | -------------------------------------------------------------------------------- /docs/game-engine/images.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Images 3 | layout: home 4 | parent: Game Engine 5 | permalink: /game-engine/images 6 | --- 7 | 8 | # Images 9 | 10 | LBA and TICO uses a 8-bit raw image format containing 256 colours and a 640 by 480 screen resolution. Each image has their own optimised palette up to 240 colours with 16 initial colours reserved for the default basic colours that are used for displaying dialogs, menu interface and debugging information on top of the image. 11 | 12 | ## LBA1 13 | 14 | ![LBA1 Sendell]({{ site.baseurl }}/assets/lba1-sendell.png) 15 | 16 | ## LBA2 17 | 18 | ![LBA2 Lighthouse]({{ site.baseurl }}/assets/lba2-lighthouse.png) 19 | 20 | ## TICO 21 | 22 | ![TICO Menu]({{ site.baseurl }}/assets/tico-menu.jpg) 23 | -------------------------------------------------------------------------------- /docs/game-engine/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Game Engine 3 | layout: home 4 | nav_order: 2 5 | permalink: /game-engine 6 | --- 7 | 8 | # Game Engine 9 | 10 | ## Overview 11 | 12 | Little Big Adventure (LBA) series engine was an evolution of the tooling created during the development of Alone in the Dark (AITD). They share a lot of the same core ideas but the team was able to innovate and evolve their technology. 13 | Both games shared pre-rendered backgrounds with 3D software rendered characters, a technique use in the early 90s due to hardware constraints. AITD was the pioneer of pre-rendered backgrounds and use static images that were hand drawn on top of 3D wireframes of a 3D scene. Each image corresponding to a different camera view of the scene. 14 | 15 | ![AITD]({{ site.baseurl }}/assets/aitd1.png) 16 | 17 | LBA did it differently and use isometric sprite composition in order to create a scene and use a single isometric camera view panning around the environment. 18 | 19 | ![LBA]({{ site.baseurl }}/assets/lba1street.gif) 20 | 21 | The isometric scenes were composed in a grid format with limited width, depth and height. Various objects were composed by a number of sprites following a set of standard dimensions and then placed together to create scenes. They are also used for collision detection with slopes to make the height transition smoothly. 22 | 23 | ![LBA1 Isometric Sprite]({{ site.baseurl }}/assets/bench-sprite.png) 24 | ![LBA1 Isometric Scene]({{ site.baseurl }}/assets/bench-iso.png) 25 | 26 | The team continue the trend in Time Commando (TICO) and used pre-rendered backgrounds with video motion. A similar technique used in LBA movies but improved to be used not only as cut-scenes but in-game backgrounds with depth information attached. 27 | 28 | ![TICO Pre-Rendered Background Motion]({{ site.baseurl }}/assets/tico-prerendermotion.gif) 29 | 30 | Another aspect that has been shared among all games is the use of 3d software rendering for the player character and non-player characters (NPC) with dedicated file formats. AITD uses 3d models with flat polygons with solid colours and dithering in some polygon types to give a more textures like feel. 31 | 32 | ![AITD 3d model]({{ site.baseurl }}/assets/aitd1-model.png) 33 | 34 | LBA uses the same flat polygons but added the implementation of Gouraud Shading and Directional Lighting. 35 | 36 | ![LBA 3d model]({{ site.baseurl }}/assets/lba1-model.png) 37 | 38 | LBA2 and TICO had another enhancement by adding texture mapping to their 3d model formats. 39 | 40 | ![LBA2 3d model]({{ site.baseurl }}/assets/lba2-model.png) ![TICO 3d models](/assets/tico.jpg) 41 | 42 | LBA2 also used the models for the outside 3d scenes, which had a further improvement from isometric only scenes in from LBA1. 43 | 44 | ![LBA2 3d Outside Scene]({{ site.baseurl }}/assets/lba2-outside.jpeg) 45 | 46 | -------------------------------------------------------------------------------- /docs/game-engine/scenes/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Scenes 3 | parent: Game Engine 4 | permalink: /game-engine/scenes 5 | --- 6 | 7 | # Scenes 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/game-engine/scenes/scripting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Scripting 3 | parent: Scenes 4 | permalink: /game-engine/scenes/scripting 5 | --- 6 | 7 | # Scripting 8 | 9 | {:toc} 10 | 11 | ## Notation 12 | 13 | Opcode fields: 14 | 15 | *char\[\]* 16 | 17 | : Embedded C-style (NUL-terminated) string. 18 | 19 | *cond* 20 | 21 | : One or more opcodes specifying a condition. 22 | 23 | *i16* 24 | 25 | : 16-bit signed value (little-endian) used for opcode arguments. 26 | 27 | *int_or_string* 28 | 29 | : Any of *char\[\]*, *i8*, *u8*, *i16*. This is used in conditions, 30 | where the type is determined by the type of the value that is being 31 | compared. 32 | 33 | *pc16* 34 | 35 | : 16-bit signed offset (little-endian) used as a jump destination, 36 | absolute. 37 | 38 | *pcrel16* 39 | 40 | : 16-bit signed offset (little-endian) used as a jump destination, 41 | relative to the current opcode. 42 | 43 | *u8* 44 | 45 | : 8-bit unsigned value used for opcode arguments. 46 | 47 | *u16* 48 | 49 | : 16-bit unsigned value (little-endian) used for opcode arguments. 50 | 51 | *u32* 52 | 53 | : 32-bit unsigned value (little-endian) used for opcode arguments. 54 | 55 | ## Life scripts 56 | 57 | Life scripts are broken down into \"behaviours\" (\"comportement\" in 58 | the source). Each time an actor\'s life script is executed, it executes 59 | the same behaviour as when it last exited (or the first behaviour if it 60 | is the first time running). This way, each behaviour acts as a mini AI 61 | loop for the actor, with each tailored to a particular situation (e.g. 62 | idling, with Twinsen nearby, in combat, interacting with an object, 63 | etc). 64 | 65 | ### Life script operations 66 | 67 | In the following table, you can see that there are a number of opcodes 68 | that have the same behaviour but different names. This is useful when 69 | compiling or decompiling the scripts as there is a 1:1 correspondence 70 | between the written script and the compiled bytecode. 71 | 72 | 73 | | Opcode (hex) | Name/syntax | Description | 74 | |--------------|--------------------------------------------|-----------------------------------------------------------------------------| 75 | | 0x00 | END | Marks the end of this script. | 76 | | 0x01 | NOP | Does nothing. | 77 | | 0x02 | SNIF cond pcrel16 | Jumps always, then replaced with SWIF opcode if condition was true. | 78 | | 0x03 | OFFSET pcrel16 | Jumps always. | 79 | | 0x04 | NEVERIF pcrel16 | Jumps always. Used as a replacement for a ONEIF opcode. | 80 | | 0x0A | PALETTE u8:palette | Switches the game's palette. | 81 | | 0x0B | RETURN | Ends the current behaviour. | 82 | | 0x0C | IF cond pcrel16 | Jumps if the condition is false. | 83 | | 0x0D | SWIF cond pcrel16 | Jumps if the condition is false and then replaced with SNIF. | 84 | | 0x0E | ONEIF cond pcrel16 | Jumps if the condition is false otherwise replaced with NEVERIF. | 85 | | 0x0F | ELSE pcrel16 | Jumps always. | 86 | | 0x10 | ENDIF | Does nothing. | 87 | | 0x11 | BODY u8:model | Changes the model of the actor. | 88 | | 0x12 | BODY_OBJ u8:actor u8:model | Changes the modem of another actor. | 89 | | 0x13 | ANIM u16:animation | Changes the animation of the actor. | 90 | | 0x14 | ANIM_OBJ u8:actor u16:anim | Changes the animation of another actor. | 91 | | 0x15 | SET_CAMERA u8:zone u8:flag | Enables or disables a camera zone. | 92 | | 0x16 | CAMERA_CENTRE u8:angle_adjust | Recentres camera. | 93 | | 0x17 | SET_TRACK i16:track | Changes this actor's move script track. | 94 | | 0x18 | SET_TRACK_OBJ u8:actor i16:track | Changes another actor's move script track. | 95 | | 0x19 | MESSAGE i16:index | Says a line of dialogue. | 96 | | 0x1A | CAN_FALL u8:fall_type | Sets whether actor can fall. | 97 | | 0x1B | SET_DIRMODE u8:mode | Sets this actor's movement mode. | 98 | | 0x1C | SET_DIRMODE_OBJ u8:actor u8:mode | Sets another actor's movement mode. | 99 | | 0x1D | CAMERA_FOLLOW u8:actor | Make camera follow an actor. | 100 | | 0x1E | SET_HERO_STANCE u8:mode | Set Twinsen's stance. | 101 | | 0x1F | SET_VAR_SCENE u8:var u8:value | Sets the value of a scene variable. | 102 | | 0x20 | BEHAVIOUR u8:id | Begins a life script behaviour block. | 103 | | 0x21 | SET_BEHAVIOUR pc16:offset | Jumps to a new behaviour block. | 104 | | 0x22 | SET_BEHAVIOR_OBJ u8:actor pc16:off | Changes the active behaviour of another actor. | 105 | | 0x23 | END_BEHAVIOUR | Marks the end of a life script behaviour block. | 106 | | 0x24 | SET_VAR_GAME u8:var i16:value | Sets the value of a game variable. | 107 | | 0x25 | KILL_OBJ u8:actor | Kills the given actor. | 108 | | 0x26 | SUICIDE | Kills this actor. | 109 | | 0x27 | USE_KEY | Subtracts one key from the inventory. | 110 | | 0x28 | SUB_MONEY i16:quantity | Takes money from Twinsen. | 111 | | 0x29 | END_LIFE | Ends life script execution for this actor. | 112 | | 0x2A | SAVE_CURRENT_TRACK | Saves the move script track to a hidden variable. | 113 | | 0x2B | RESTORE_LAST_TRACK | Restores the move script track from the hidden variable. | 114 | | 0x2C | MESSAGE_OBJ u8:actor i16:message | Another actor says a line of dialogue. | 115 | | 0x2D | INC_CHAPTER | Increment the chapter number game variable. | 116 | | 0x2E | FOUND_OBJECT u8:object | Display the "found object" overlay. | 117 | | 0x2F | SET_DOOR_LEFT i16:distance | Slides this door to the left. | 118 | | 0x30 | SET_DOOR_RIGHT i16:distance | Slides this door to the right. | 119 | | 0x31 | SET_DOOR_UP i16:distance | Slides this door upwards. | 120 | | 0x32 | SET_DOOR_DOWN i16:distance | Slides this door downwards. | 121 | | 0x33 | GIVE_BONUS u8:remove | Gives this actor's bonus items. | 122 | | 0x34 | CHANGE_SCENE u8:scene | Move to a different scene. | 123 | | 0x35 | OBJ_COL u8:enabled | Enables or disables object/actor collisions for this actor. | 124 | | 0x36 | BRICK_COL u8:collision_type | Enables or disables terrain collisions for this actor. | 125 | | 0x37 | OR_IF cond pcrel16 | Jumps if condition is true. | 126 | | 0x38 | INVISIBLE u8:invisible | Makes the actor invisible or visible again. | 127 | | 0x39 | SHADOW_OBJ u8:actor u8:enabled | Enables or disables the shadow for another actor. | 128 | | 0x3A | POS_POINT u8:point | Moves this actor to a point. | 129 | | 0x3B | SET_MAGIC_LEVEL u8:level | Sets Twinsen's magic level. | 130 | | 0x3C | SUB_MANA u8:quantity | Drains some of Twinsen's mana. | 131 | | 0x3D | SET_HEALTH_OBJ u8:actor u8:value | Sets the health of an actor. | 132 | | 0x3E | SUB_HEALTH_OBJ u8:actor u8:points | Subtracts health from another actor. | 133 | | 0x3F | HIT u8:victim u8:damage | Deals damage to another actor, caused by this actor. | 134 | | 0x40 | PLAY_VIDEO char\[\]:name | Plays the named cutscene video. | 135 | | 0x41 | LIGHTNING u8:duration | Display a lightning flash. | 136 | | 0x42 | INC_CLOVER_BOX | Gives Twinsen another clover box. | 137 | | 0x43 | SET_USED_INVENTORY u8:item | Use inventory item. | 138 | | 0x44 | ADD_CHOICE i16:message | Adds choice to the next ask. | 139 | | 0x45 | ASK_CHOICE i16:message | Says a line of dialogue and offers choices. | 140 | | 0x46 | INIT_BUGGY u8:flag | Sets up Twinsen's car. | 141 | | 0x47 | MEMO_SLATE u8:picture | Adds a picture to the memo slate. | 142 | | 0x48 | SET_HOLO_POS u8:marker | Adds a marker to the holomap. | 143 | | 0x49 | CLR_HOLO_POS u8:marker | Removes a marker from the holomap. | 144 | | 0x4A | ADD_FUEL u8:ignored | Does nothing (LBA1 leftover). | 145 | | 0x4B | SUB_FUEL u8:ignored | Does nothing (LBA1 leftover). | 146 | | 0x4C | SET_FRAGMENT u8:zone u8:enable | Enables or disables a terrain chunk. | 147 | | 0x4D | SET_TELEPORT_ZONE u8:zone u8:flag | Enables or disables a teleport zone. | 148 | | 0x4E | MESSAGE_ZOE i16:message | Says a line using Zoe's voice. | 149 | | 0x4F | FULL_POINT | Restores Twinsen's health, mana and healing horn. | 150 | | 0x50 | BETA i16:angle | Rotates actor. | 151 | | 0x51 | FADE_TO_PAL u8:palette | Fades to the given palette. | 152 | | 0x52 | ACTION | Triggers Twinsen's action (like pressing the Z key). | 153 | | 0x53 | SET_FRAME u8:frame | Changes the frame number of this actor's animation. | 154 | | 0x54 | SET_SPRITE u8:sprite | Changes the sprite used for this actor. | 155 | | 0x55 | SET_FRAME_3DS u8:frame | Changes the frame number of this actor's animated sprite. | 156 | | 0x56 | IMPACT_OBJ u8:actor i16:anim i16:yoffset | Plays an impact animation above an actor. | 157 | | 0x57 | IMPACT_POINT u8:point i16:anim | Plays an impact animation at a point. | 158 | | 0x58 | ADD_MESSAGE i16:message | Same as MESSAGE. | 159 | | 0x59 | BALLOON u8:enable | Enables or disables use of speech balloons. | 160 | | 0x5A | NO_HIT u8:enable | Enables or disables ignoring hits/damage to this actor. | 161 | | 0x5B | ASK_CHOICE u8:actor i16:message | Another actor says a line of dialogue and offers choices. | 162 | | 0x5C | CINEMA_MODE u8:enable | Enables or disables cutscene mode. | 163 | | 0x5D | SAVE_HERO | Saves Twinsen's stance to a hidden variable. | 164 | | 0x5E | RESTORE_HERO | Restores Twinsen's stance from a hidden variable. | 165 | | 0x5F | ANIM_SET u16:anim | Sets this actor's animation. | 166 | | 0x60 | RAIN u8:duration | Makes it rain. | 167 | | 0x61 | GAME_OVER | Kills Twinsen and ends the game. | 168 | | 0x62 | THE_END | Ends the game and shows the credits. | 169 | | 0x63 | SET_CONVEYOR_ZONE u8:zone u8:flag | Enables or disables a conveyor zone. | 170 | | 0x64 | PLAY_MUSIC u8:track | Plays a music track. | 171 | | 0x65 | SAVE_TRACK_TO_GAME_VAR u8:var | Saves this actor's move script track to a game variable. | 172 | | 0x66 | SET_TRACK_FROM_GAME_VAR u8:var | Sets this actor's move script track from a game variable. | 173 | | 0x67 | ANIM_TEXTURE u8:enable | Enable or disable texture animation. | 174 | | 0x68 | ADD_MESSAGE_OBJ u8:actor i16:msg | Same as MESSAGE_OBJ. | 175 | | 0x69 | BRUTAL_EXIT | Ends the game without displaying the credits. | 176 | | 0x6A | COMMENT | Does nothing. | 177 | | 0x6B | SET_LADDER_ZONE u8:zone u8:enable | Enables or disables a ladder zone. | 178 | | 0x6C | SET_ARMOUR u8:armour | Sets this actor's armour value. 179 | | 0x6D | SET_ARMOR_OBJ u8:actor u8:obj | Sets the armour value of another actor. | 180 | | 0x6E | ADD_HEALTH_OBJ u8:actor u8:life | Adds health to another actor. | 181 | | 0x6F | STATE_INVENTORY u8:item u8:state | Changes the state/variant of an inventory object. | 182 | | 0x70 | AND_IF cond pcrel16 | Jumps if condition is false. | 183 | | 0x71 | SWITCH | Begins a switch statement. | 184 | | 0x72 | OR_CASE pcrel16 cond | Jumps if condition fails. | 185 | | 0x73 | CASE pcrel16 cond | Jumps if condition succeeds. | 186 | | 0x74 | DEFAULT | Does nothing. | 187 | | 0x75 | BREAK pcrel16 | Jumps to offset. | 188 | | 0x76 | END_SWITCH | Does nothing. | 189 | | 0x77 | SET_SPIKE_ZONE u8:zone u8:damage | Enables or disables a spike/trap zone. | 190 | | 0x78 | SAVE_BEHAVIOUR | Saves this actor's behaviour index to a hidden variable. | 191 | | 0x79 | RESTORE_BEHAVIOUR | Restores this actor's behaviour from the hidden variable. | 192 | | 0x7A | SAMPLE i16:sample | Plays a sound sample coming from this actor. | 193 | | 0x7B | SAMPLE_RND i16:sample | Like SAMPLE but randomly alters the sample's frequency. | 194 | | 0x7C | SAMPLE_ALWAYS i16:sample | Like SAMPLE but plays the sample continuously. | 195 | | 0x7D | SAMPLE_STOP i16:sample | Stops the given sample if it is playing from this actor. | 196 | | 0x7E | REPEAT_SAMPLE i16:sample u8:count | Like SAMPLE but plays the given number of repeats. | 197 | | 0x7F | BACKGROUND u8:flag | Sets or clears the "background" (don't redraw) flag for this actor. | 198 | | 0x80 | ADD_VAR_GAME u8:var i16:value | Adds a value to a game variable. | 199 | | 0x81 | SUB_VAR_GAME u8:var i16:value | Subtracts a value from a game variable. | 200 | | 0x82 | ADD_VAR_SCENE u8:var u8:value | Adds a value to a scene variable. | 201 | | 0x83 | SUB_VAR_SCENE u8:var u8:value | Subtracts a value from a scene variable. | 202 | | 0x84 | NOP | Does nothing. | 203 | | 0x85 | SET_RAIL_ZONE u8:zone u8:enable | Enables or disables a rail zone. | 204 | | 0x86 | INVERSE_BETA | Rotates the actor to face the opposite direction. | 205 | | 0x87 | NO_BODY | Hides the model for this actor. | 206 | | 0x88 | ADD_MONEY i16:quantity | Gives money to Twinsen. | 207 | | 0x89 | SAVE_CURRENT_TRACK_OBJ u8:actor | Saves the move script track of another actor to a hidden variable. | 208 | | 0x8A | RESTORE_LAST_TRACK_OBJ u8:actor | Restores the move script track of another actor from the hidden variable. | 209 | | 0x8B | SAVE_BEHAVIOUR_OBJ u8:actor | Saves the life script behaviour of another actor to a hidden variable. | 210 | | 0x8C | RESTORE_BEHAVIOUR_OBJ u8:actor | Restores the life script behaviour of another actor from the hidden variable.| 211 | | 0x8D | SPY | Does nothing. | 212 | | 0x8E | DEBUG | Does nothing. | 213 | | 0x8F | DEBUG_OBJ | Does nothing. | 214 | | 0x90 | POPCORN | Does nothing. | 215 | | 0x91 | FLOW_POINT u8:point u8:flow | Displays a particle animation at a point. | 216 | | 0x92 | FLOW_OBJ u8:actor u8:flow | Displays a particle animation on an actor. | 217 | | 0x93 | SET_ANIM_DIAL u16:anim | Sets the animation to use when talking. | 218 | | 0x94 | PCX u8:image | Displays a still image. | 219 | | 0x95 | END_MESSAGE | Does nothing. | 220 | | 0x96 | END_MESSAGE_OBJ u8:ignored | Does nothing. | 221 | | 0x97 | PARM_SAMPLE i16:freq u8:vol i16:fbase | Configures audio sample parameters. | 222 | | 0x98 | NEW_SAMPLE i16:sample i16:f u8:v i16:fb | Plays an audio sample on this actor with custom parameters. | 223 | | 0x99 | POS_OBJ_AROUND u8:move_actor u8:dest | Positions an actor on or near another actor. | 224 | | 0x9A | PCX_MESS_OBJ u8:img u8:fx u8:act i16:msg | Show a message on a still image background. | 225 | 226 | Fall types (undocumented values are invalid): 227 | 228 | 0. actor cannot fall 229 | 1. actor can fall 230 | 2. actor can fall; stops any fall in progress 231 | 232 | Movement modes (undocumented values are invalid): 233 | 234 | 0. no movement 235 | 1. controlled by player 236 | 2. follow actor (opcode has extra param: uint8: actor to follow) 237 | 3. invalid 238 | 4. invalid 239 | 5. invalid 240 | 6. same XZ position as other actor 241 | 7. MecaPenguin movement 242 | 8. rail cart movement 243 | 9. circle a point (opcode has extra param: uint8: point index) 244 | 10. circle a point while facing it (opcode has extra param: uint8: point 245 | index) 246 | 11. same XZ position and angle as other actor 247 | 12. car movement 248 | 13. car movement under player control 249 | 250 | Hero stances (undocumented values are invalid): 251 | 252 | 0. normal 253 | 1. athletic 254 | 2. aggressive 255 | 3. discreet 256 | 4. protopack 257 | 5. walking with Zoe 258 | 6. healing horn 259 | 7. spacesuit normal (interior) 260 | 8. jetpack 261 | 9. spacesuit athletic (interior) 262 | 10. spacesuit normal (exterior) 263 | 11. spacesuit athletic (exterior) 264 | 12. car 265 | 13. skeleton 266 | 267 | Collision types (undocumented values are invalid): 268 | 269 | 0. can move through terrain bricks 270 | 1. blocked by terrain bricks 271 | 2. blocked by terrain bricks but can crawl through narrow passages 272 | 273 | Buggy init types (undocumented values are invalid): 274 | 275 | 0. no init 276 | 1. init if needed 277 | 2. force init 278 | 279 | Effects for PCX_MESS_OBJ (undocumented values are invalid): 280 | 281 | 0. no effect 282 | 1. venetian blinds effect 283 | 284 | ### Life script conditions 285 | 286 | | Opcode (hex) | Name/syntax | Description | 287 | |:-------------|:------------------------------------|:----------------------------------------------------------------------------| 288 | | 0x00 | COL -> i8 | Actor this actor collided with (or -1 if none). | 289 | | 0x01 | COL_OBJ u8:actor -> i8 | Actor another actor collided with (or -1 if none). | 290 | | 0x02 | DISTANCE u8:actor -> i16 | 2D distance to another actor. | 291 | | 0x03 | ZONE -> i8 | Index of sceneric zone this actor is within (or -1 if none). | 292 | | 0x04 | ZONE_OBJ u8:actor -> i8 | Index of sceneric zone another actor is within (or -1 if none). | 293 | | 0x05 | BODY -> i8 | Model used for this actor. | 294 | | 0x06 | BODY_OBJ u8:actor -> i8 | Model used by another actor. | 295 | | 0x07 | ANIM -> i16 | Animation used by this actor. | 296 | | 0x08 | ANIM_OBJ u8:actor -> i16 | Animation used by another actor. | 297 | | 0x09 | TRACK -> u8 | Life script track active on this actor. | 298 | | 0x0A | TRACK_OBJ u8:actor -> u8 | Life script track active on another actor. | 299 | | 0x0B | VAR_SCENE u8:var -> u8 | Value of a scene variable. | 300 | | 0x0C | CONE_VIEW u8:actor -> i16 | Distance to another actor, if they are within a 90-degree view cone. | 301 | | 0x0D | HIT_BY -> i8 | Actor that last hit this actor. | 302 | | 0x0E | ACTION -> i8 | Action key was pressed. | 303 | | 0x0F | VAR_GAME u8:var -> i16 | Value of a game variable. | 304 | | 0x10 | LIFE_POINT -> i16 | Health of this actor. | 305 | | 0x11 | LIFE_POINT_OBJ u8:actor -> i16 | Health of another actor. | 306 | | 0x12 | KEYS -> i8 | Number of keys. | 307 | | 0x13 | MONEY -> i16 | Money. | 308 | | 0x14 | HERO_STANCE -> i8 | Twinsen's stance. | 309 | | 0x15 | CHAPTER -> i8 | Game chapter. | 310 | | 0x16 | DISTANCE_3D u8:actor -> i16 | 3D distance to another actor. | 311 | | 0x17 | MAGIC_LEVEL -> i8 | Magic level. | 312 | | 0x18 | MANA -> i8 | Twinsen's mana points. | 313 | | 0x19 | ITEM_USED u8:item -> i8 | Item being used. | 314 | | 0x1A | CHOICE -> i16 | Choice made in last dialogue. | 315 | | 0x1B | FUEL -> i16 | Returns junk value; do not used (lba1 leftover). | 316 | | 0x1C | CARRY_BY -> i8 | Actor carrying this actor. | 317 | | 0x1D | CDROM -> i8 | Whether this is the CDROM build or floppy build. | 318 | | 0x1E | LADDER u8:zone -> i8 | Whether a ladder zone is enabled. | 319 | | 0x1F | RND u8:max -> u8 | Random number. | 320 | | 0x20 | RAIL u8:zone -> i8 | Whether a rail zone is enabled. | 321 | | 0x21 | BETA -> i16 | Current angle of this actor. | 322 | | 0x22 | BETA_OBJ u8:actor -> i16 | Current angle of another actor. | 323 | | 0x23 | CARRY_OBJ_BY u8:actor -> i8 | Actor carrying another actor. | 324 | | 0x24 | ANGLE u8:actor -> i16 | Angle from this actor to another actor. | 325 | | 0x25 | DISTANCE_MESSAGE u8:actor -> i16 | Distance from another actor, if within an angle suitable for conversation. | 326 | | 0x26 | HIT_OBJ_BY u8:actor -> i8 | Actor that last hit another actor. | 327 | | 0x27 | REAL_ANGLE u8:actor -> i16 | Angle from this actor to another, clamped. | 328 | | 0x28 | DEMO -> i8 | Whether this is the demo build. | 329 | | 0x29 | COL_BRICK -> i8 | Whether this actor collides with scenery. | 330 | | 0x2A | COL_BRICK_OBJ u8:actor -> i8 | Whether another actor collides with scenery. | 331 | | 0x2B | PROCESSOR -> i8 | Whether running on an old processor. | 332 | | 0x2C | OBJECT_DISPLAYED u8:actor -> i8 | Whether this actor was drawn to the screen. | 333 | | 0x2D | ANGLE_OBJ u8:actor -> i16 | Angle from another actor to this actor. | 334 | 335 | | Opcode (hex) | Name/syntax | Description | 336 | |:-------------|:---------------------------------|:---------------------------------------------------------------| 337 | | 0x00 | EQUAL int_or_string | Whether the value is equal to the constant. | 338 | | 0x01 | GREATER int_or_string | Whether the value is greater than the constant. Not valid for strings. | 339 | | 0x02 | LESS int_or_string | Whether the value is less than the constant. Not valid for strings. | 340 | | 0x03 | GREATER_OR_EQUAL int_or_string | Whether the value is not less than the constant. Not valid for strings.| 341 | | 0x04 | LESS_OR_EQUAL int_or_string | Whether the value is not greater than the constant. Not valid for strings.| 342 | | 0x05 | NOT_EQUAL int_or_string | Whether the value is not equal to the constant. | 343 | 344 | ## Move scripts 345 | 346 | | Opcode (hex) | Name/syntax | Description | 347 | |:-------------|:-----------------------------------------|:----------------------------------------------------------------------------| 348 | | 0x00 | END | Ends this move script. | 349 | | 0x01 | NOP | Does nothing. | 350 | | 0x02 | BODY u8:model | Sets this actor's model. | 351 | | 0x03 | ANIM u16:anim | Sets this actor's current animation. | 352 | | 0x04 | GOTO_POINT u8:point | Actor rotates to face the given point and waits until its animation takes it there. | 353 | | 0x05 | WAIT_ANIM | Waits for the current animation to end. | 354 | | 0x06 | LOOP u8:init u8:remaining pcrel16 | Decrements remaining, jumps if non-zero, sets remaining to init if zero. | 355 | | 0x07 | ANGLE i16:angle | Actor rotates to the given angle and waits until the rotation completes. | 356 | | 0x08 | POS_POINT u8:point | Instantly teleports the actor to a point. | 357 | | 0x09 | MOVE_TRACK u8:id | Begins a track block within this move script. | 358 | | 0x0A | GOTO pcrel16 | Jumps to another part of the move script. | 359 | | 0x0B | STOP | Stops executing this move script. | 360 | | 0x0C | GOTO_POINT_BACKWARDS u8:point | Actor rotates to face away from the given point and waits until its animation takes it there. | 361 | | 0x0D | WAIT_NUM_ANIM u8:count u8:zero | Waits for the actor's animation to have played a number of times. | 362 | | 0x0E | SAMPLE i16:sample | Plays a sound sample. | 363 | | 0x0F | GOTO_POINT_3D u8:point | Actor moves to the given point, if it's a 3D sprite. | 364 | | 0x10 | SPEED i16:speed | Sets the rotation speed of the actor. | 365 | | 0x11 | BACKGROUND u8:enabled | Enables or disables the "background" flag for this actor. | 366 | | 0x12 | WAIT_NUM_SECOND u8:count u32:zero | Wait for the number of seconds. | 367 | | 0x13 | NO_BODY | Sets this actor to have no model. | 368 | | 0x14 | BETA i16:angle | Rotates this actor instantly. | 369 | | 0x15 | OPEN_LEFT i16:distance | Door slides to the left. | 370 | | 0x16 | OPEN_RIGHT i16:distance | Door slides to the right. | 371 | | 0x17 | OPEN_UP i16:distance | Door slides upwards. | 372 | | 0x18 | OPEN_DOWN i16:distance | Door slides downwards. | 373 | | 0x19 | CLOSE | Restore door's original position. | 374 | | 0x1A | WAIT_DOOR | Wait until door finishes moving. | 375 | | 0x1B | SAMPLE_RND i16:sample | Plays a sound sample with a random frequency adjustment. | 376 | | 0x1C | SAMPLE_ALWAYS i16:sample | Plays a sound sample forever. | 377 | | 0x1D | SAMPLE_STOP i16:sample | Stops a particular sound sample. | 378 | | 0x1E | PLAY_VIDEO char[]:name | Plays a cutscene video. | 379 | | 0x1F | REPEAT_SAMPLE i16:count | Sets the number of repeats for SIMPLE_SAMPLE. | 380 | | 0x20 | SIMPLE_SAMPLE i16:sample | Plays a sample according to REPEAT_SAMPLE and resets the repeat count to 1. | 381 | | 0x21 | FACE_HERO i16:negative_one | Actor rotates to face Twinsen and waits until the rotation completes. | 382 | | 0x22 | ANGLE_RND i16:angle i16:negative_one | Actor rotates to a random angle and waits until the rotation completes. | 383 | | 0x23 | COMMENT | Does nothing. | 384 | | 0x24 | WAIT_NUM_DECISECONDS u8:count u32:zero | Waits for a number of deciseconds (tenths of a second). | 385 | | 0x25 | DO | Does nothing. | 386 | | 0x26 | SPRITE i16:sprite | Sets this actor's sprite. | 387 | | 0x27 | WAIT_NUM_SECOND_RND u8:max u32:zero | Waits for a random number of seconds, up to a maximum. | 388 | | 0x28 | AFF_TIMER | Does nothing. | 389 | | 0x29 | SET_FRAME u8:frame | Sets the actor's animation frame. | 390 | | 0x2A | SET_FRAME_3DS u8:frame | Sets the actor's 3D sprite animation frame. | 391 | | 0x2B | SET_START_3DS u8:frame | Sets the start frame of the actor's 3D sprite animation. | 392 | | 0x2C | SET_END_3DS u8:frame | Sets the end frame of the actor's 3D sprite animation. | 393 | | 0x2D | START_ANIM_3DS u8:fps | Starts the actor's 3D sprite animation. | 394 | | 0x2E | STOP_ANIM_3DS | Stops the actor's 3D sprite animation. | 395 | | 0x2F | WAIT_ANIM_3DS | Waits until the actor's 3D sprite animation ends or is stopped. | 396 | | 0x30 | WAIT_FRAME_3DS u8:frame | Waits until the actor's 3D sprite animation reaches the given frame. | 397 | | 0x31 | WAIT_NUM_DECISECONDS_RND u8:max u32:0 | Waits for a random number of deciseconds, up to a maximum. | 398 | | 0x32 | INTERVAL int16:interval | Sets the interval between sample repeats. | 399 | | 0x33 | FREQUENCY i16:frequency | Sets the frequency for sample playback. | 400 | | 0x34 | VOLUME u8:volume | Sets the volume for sample playback. | 401 | 402 | -------------------------------------------------------------------------------- /docs/game-engine/scenes/zones.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Zones 3 | parent: Scenes 4 | permalink: /game-engine/scenes/zones 5 | --- 6 | 7 | # Zones 8 | 9 | Zones are used to demarcate 3D regions of space within scenes. There are 10 | various types of zones, each of which have different behaviours when 11 | Twinsen enters or interacts with them: 12 | 13 | - *teleport zones* transport Twinsen to a different scene when entered 14 | - *camera zones* change the camera position and angle when entered 15 | - *sceneric zones* define areas of the scene used for \"is actor in 16 | zone?\" queries in scripts 17 | - *fragment zones* define an area of the scene\'s terrain that can be 18 | dynamically shown or hidden 19 | - *bonus zones* dispense items when interacted with 20 | - *text zones* are used to implement signs and say dialogue when 21 | interacted with 22 | - *ladder zones* provide vertical movement 23 | - *conveyor zones* move actors which stand within them 24 | - *spike zones* deal damaged when entered (floor spikes, traps, etc) 25 | - *rail zones* are used to control minecart movement 26 | 27 | All zones are cuboid in shape. 28 | 29 | ## Zone File Format 30 | 31 | Zones are stored as part of the scene containing the zone: 32 | 33 | ```c 34 | { 35 | i32 x0 36 | i32 y0 37 | i32 z0 38 | i32 x1 39 | i32 y1 40 | i32 z1 41 | i32 info0 42 | i32 info1 43 | i32 info2 44 | i32 info3 45 | i32 info4 46 | i32 info5 47 | i32 info6 48 | i32 info7 49 | i16 type 50 | i16 value 51 | } 52 | ``` 53 | 54 | - *x0*, *y0*, *z0*: first corner defining the zone cuboid 55 | - *x1*, *y1*, *z1*: opposite corner defining the zone cuboid 56 | - *info0..7*: zone parameters; interpretation depends on the zone type 57 | - *type*: the type of zone 58 | - *value*: zone parameter; interpretation depends on the zone type 59 | 60 | | Zone type | Name | 61 | |:----------|:----------| 62 | | 0 | Teleport | 63 | | 1 | Camera | 64 | | 2 | Sceneric | 65 | | 3 | Fragment | 66 | | 4 | Bonus | 67 | | 5 | Text | 68 | | 6 | Ladder | 69 | | 7 | Conveyor | 70 | | 8 | Spike | 71 | | 9 | Rail | 72 | 73 | The documentation below for each of the zone types describes how the 74 | flags are interpreted, as loaded from the scene. The LBA engine modifies 75 | some of these values at run-time in order to avoid allocating additional 76 | memory; these run-time uses and modifications are not documented here. 77 | 78 | ## Teleport zones 79 | 80 | | Parameter | Description | 81 | |:----------|:----------------------------------------------------------------------------------------------------| 82 | | param | Destination scene | 83 | | info0 | Destination x | 84 | | info1 | Destination y | 85 | | info2 | Destination z | 86 | | info3 | Destination angle | 87 | | info4 | Zone scripting ID | 88 | | info5 | Door flags: bit 0 - for exterior scenes, don't activate zone until Twinsen collides with the door | 89 | | info6 | Collision flags: bit 0 - don't adjust Twinsen to fix collisions | 90 | | info7 | Enable flags: bit 0 - zone is enabled | 91 | 92 | 93 | Teleport zones can be enabled or disabled from script by using the 94 | SET_TELEPORT_ZONE opcode. 95 | 96 | ## Camera zones 97 | 98 | | Parameter | Description | 99 | |:----------|:-----------------------------------------| 100 | | param | Zone scripting ID | 101 | | info0 | Camera x | 102 | | info1 | Camera y | 103 | | info2 | Camera z | 104 | | info3 | Camera alpha angle | 105 | | info4 | Camera beta angle | 106 | | info5 | Camera gamma angle | 107 | | info6 | View distance | 108 | | info7 | Enable flags: bit 0 - zone is enabled | 109 | 110 | Camera zones can be enabled or disabled from script by using the 111 | SET_CAMERA opcode. 112 | 113 | ## Sceneric zones 114 | 115 | | Parameter | Description | 116 | |:----------|:-------------------| 117 | | param | Zone scripting ID | 118 | | info0 | -unused- | 119 | | info1 | -unused- | 120 | | info2 | -unused- | 121 | | info3 | -unused- | 122 | | info4 | -unused- | 123 | | info5 | -unused- | 124 | | info6 | -unused- | 125 | | info7 | -unused- | 126 | 127 | Sceneric zones can be used from scripts by checking whether an actor is 128 | within them by using the ZONE and ZONE_OBJ conditions. 129 | 130 | ## Fragment zones 131 | 132 | | Parameter | Description | 133 | |:----------|:-----------------------------------------| 134 | | param | Zone scripting ID | 135 | | info0 | Fragment number | 136 | | info1 | -unused- | 137 | | info2 | Enable flags: bit 0 - zone is enabled | 138 | | info3 | -unused- | 139 | | info4 | -unused- | 140 | | info5 | -unused- | 141 | | info6 | -unused- | 142 | | info7 | -unused- | 143 | 144 | Fragment zones can be enabled or disabled from script by using the 145 | SET_FRAGMENT opcode. 146 | 147 | ## Bonus zones 148 | 149 | | Parameter | Description | 150 | |:----------|:---------------| 151 | | param | -unused- | 152 | | info0 | Bonus type | 153 | | info1 | Bonus quantity | 154 | | info2 | -unused- | 155 | | info3 | -unused- | 156 | | info4 | -unused- | 157 | | info5 | -unused- | 158 | | info6 | -unused- | 159 | | info7 | -unused- | 160 | 161 | Bonus zones are not scriptable. 162 | 163 | ## Text zones 164 | 165 | | Parameter | Description | 166 | |:----------|:-----------------------------------------| 167 | | param | Message ID | 168 | | info0 | Text colour | 169 | | info1 | Associated camera zone (zero for none) | 170 | | info2 | Direction | 171 | | info3 | -unused- | 172 | | info4 | -unused- | 173 | | info5 | -unused- | 174 | | info6 | -unused- | 175 | | info7 | -unused- | 176 | 177 | Text zones are not scriptable. 178 | 179 | The direction values seem appropriate for use as a bitmask but the LBA 180 | engine checks for equality, not a bit test, so each text zone can only 181 | face a single direction. Double-sided signs would require two sign 182 | zones, one on each side. 183 | 184 | | Zone direction | Description | 185 | |:---------------|:-------------------| 186 | | 1 | Sign faces North | 187 | | 2 | Sign faces South | 188 | | 4 | Sign faces East | 189 | | 8 | Sign faces West | 190 | 191 | ## Ladder zones 192 | 193 | | Parameter | Description | 194 | |:----------|:-------------------| 195 | | param | Zone scripting ID | 196 | | info0 | Enabled | 197 | | info1 | -unused- | 198 | | info2 | -unused- | 199 | | info3 | -unused- | 200 | | info4 | -unused- | 201 | | info5 | -unused- | 202 | | info6 | -unused- | 203 | | info7 | -unused- | 204 | 205 | Ladder zones can be enabled or disabled from script using the 206 | SET_LADDER_ZONE opcode. Their enabled state can be queried using the 207 | LADDER condition. 208 | 209 | ## Conveyor zones 210 | 211 | | Parameter | Description | 212 | |:----------|:-------------------| 213 | | param | Zone scripting ID | 214 | | info0 | -unused- | 215 | | info1 | Enabled | 216 | | info2 | Direction | 217 | | info3 | -unused- | 218 | | info4 | -unused- | 219 | | info5 | -unused- | 220 | | info6 | -unused- | 221 | | info7 | -unused- | 222 | 223 | Conveyor zones can be enabled or disabled from script using the 224 | SET_CONVEYOR_ZONE opcode. 225 | 226 | The direction values seem appropriate for use as a bitmask but the LBA 227 | engine checks for equality, not a bit test. 228 | 229 | | Zone direction | Description | 230 | |:---------------|:-------------------------| 231 | | 1 | Conveyor travels North | 232 | | 2 | Conveyor travels South | 233 | | 4 | Conveyor travels East | 234 | | 8 | Conveyor travels West | 235 | 236 | ## Spike zones 237 | 238 | | Parameter | Description | 239 | |:----------|:-------------------| 240 | | param | Zone scripting ID | 241 | | info0 | -unused- | 242 | | info1 | Damage | 243 | | info2 | Rearm time | 244 | | info3 | -unused- | 245 | | info4 | -unused- | 246 | | info5 | -unused- | 247 | | info6 | -unused- | 248 | | info7 | -unused- | 249 | 250 | The damage of spike zones can be controlled from script using the 251 | SET_SPIKE_ZONE opcode. Setting the damage to zero will disable the spike 252 | zone; setting it to a non-zero value will enable it. 253 | 254 | ## Rail zones 255 | 256 | | Parameter | Description | 257 | |:----------|:-------------------| 258 | | param | Zone scripting ID | 259 | | info0 | Enabled | 260 | | info1 | Switch set | 261 | | info2 | -unused- | 262 | | info3 | -unused- | 263 | | info4 | -unused- | 264 | | info5 | -unused- | 265 | | info6 | -unused- | 266 | | info7 | -unused- | 267 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | layout: home 4 | nav_order: 1 5 | description: The Little Big Adventure Series Engine Architecture is a project to document and teach how Adeline Software International implement their games, including Little Big Adventure 1 (Relentless Twinsen's Adventure), Little Big Adventure 2 (Twinsen's Odyssey) and Time Commando. 6 | permalink: / 7 | --- 8 | 9 | # Introduction 10 | 11 | The Little Big Adventure Series Engine Architecture is a project to document and teach how Adeline Software International implement their games, including Little Big Adventure 1 (Relentless: Twinsen's Adventure), Little Big Adventure 2 (Twinsen's Odyssey) and Time Commando. 12 | 13 | This documentation will refer to the engines open-sourced and reimplemented by the community, such as [lba1-classic-community](https://github.com/LBALab/lba1-classic-community), [lba2-classic-community](https://github.com/LBALab/lba2-classic-community), [twin-e](https://github.com/LBALab/twin-e), [twine ScummVM](https://github.com/scummvm/scummvm/tree/master/engines/twine). 14 | 15 | ## Copyright 16 | The intellectual property is currently owned by [2.21]. Copyright [2.21] 17 | 18 | Originaly developed by Adeline Software International in 1994 (LBA1), Time Commando (1996) and LBA2 (1997). 19 | 20 | ## Licence 21 | This documentation is licensed under MIT. 22 | 23 | The source code for both games that has been release by [2.21] has been licensed under the GNU General Public License. 24 | 25 | Please note theses licenses do not apply to Little Big Adventure 1 & 2 or Time Commando game assets (art, models, textures, audio, etc.) are not open-sourced and therefore aren't redistributable. 26 | -------------------------------------------------------------------------------- /docs/useful-links.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Useful Links 3 | layout: home 4 | permalink: /links 5 | --- 6 | 7 | # Useful Links 8 | 9 | ## Development 10 | 11 | [LBA Lab Github Organisation](https://github.com/LBALab) 12 | 13 | [LBA1 Source Code](https://github.com/LBALab/lba1-classic-community) 14 | 15 | [LBA2 Source Code](https://github.com/LBALab/lba2-classic-community) 16 | 17 | [File Info](http://lbafileinfo.kaziq.net/index.php/Main_Page) 18 | 19 | [Metadata](https://github.com/lbalab/metadata) 20 | 21 | ## Community 22 | 23 | [Discord Community](https://discord.gg/gfzna5SfZ5) 24 | 25 | [Magicball Networks](https://forum.magicball.net/) 26 | --------------------------------------------------------------------------------