Skip to content

Latest commit

 

History

History
89 lines (58 loc) · 4.36 KB

getting_started.md

File metadata and controls

89 lines (58 loc) · 4.36 KB

Getting Started

These instructions describe how to setup a local copy of the source code if you'd like to contribute or modify the project. We assume you have a working knowledge of git, github and running commands from a terminal.

Prerequisites

You'll need to install Node.js, which includes the npm command for managing dependencies. If you already have node.js installed, make sure it is a recent version (>= 9.x.x). LTS versions are preferred.

Copying assets

Buy a copy of the game

In order to be able to play the game locally, you need to have a copy of the original game assets. For obvious legal reasons we can't include those in the repository. You can obtain an original copy of the game from GOG or Steam. If you own it already, make sure you updated your game installation to the latest.

Get a copy of the project

  • Fork the project on github
  • git clone your forked version of the project to get the code on your computer

Open the command shell

  • Next commands are performed from your local copy's root folder.
  • Use PowerShell in Windows, or Terminal in Mac

Installing the dependencies

  • Run npm install

Import the game assets

  • If you have GoG or Steam version of LBA 2, run the following import command to import game assets. If you have other version, or if you are on Linux, see Manual Import below.
  • On Windows run npm run import:win "<path to installed game>" Example: npm run import:win "C:\games\Little Big Adventure 2"
  • On Mac run npm run import "<path to installed GOG game>" Example: npm run import "/Applications/Little Big Adventure 2 (Twinsen's Odyssey).app"

If you are using the standalone GoG version on MacOS, you need to provide the path to an installed version of dosbox. Example: npm run import "/Applications/Little Big Adventure 2 (Twinsen's Odyssey).app" /Applications/dosbox.app

Running the development server

The development server is responsible for monitoring the source file and compiling them as they change. It acts as a webserver which you point to from your browser to play the remake.

npm run dev

  • If you have any troubles with npm install or with npm run dev try removing the package-lock.json and possible yarn.lock file as well as your node_module folder. Then run npm install and npm run dev again.

Running the game

Just point your browser to the following url: http://localhost:8080 The first launch might take some time, but subsequent page refresh will be fast.

You can now start editing the code and refresh the page to see the result (the dev server compiles your changes almost instantly).

What next?

Once your development environment is up and running, you can check the architecture guide to learn more about how the project is organized.

If you want to contribute to the project as an artist, you can check the art workflow document to learn about the art workflow.

Manual Import

Only do this step if the import script failed (that means you have some other version than Steam or GoG. But if you have Steam or GoG version, make sure to update it to the latest before runing the import script, as it usually helps)

Copy the resource files

Musics, voices, sound samples and videos can't be read directly, they have to be converted to mp4 and aac files. We have a convert script, but before you need to copy the original files manually to the www/data

  • Copy the *.HQR, *.OBL, *.ILE files and the VOX, MUSIC, VIDEO folders from the original game install folder to www/data All those files can be inside an ISO image that comes with your game, so you need to extract them. But they all must be there.
  • Music ends up in the www/data/MUSIC folder
  • Video hqr file ends up in the www/data/VIDEO folder
  • Voices (*.vox) end up in the www/data/VOX folder
  • The rest of the files end up in www/data folder

Convert the videos and musics

Run convert scripts from the root game folder. On Windows run the scripts from PowerShell, on Mac use Terminal.

npm run convert music 128 32
npm run convert video
npm run convert voice 64
npm run convert samples 32