Local Setup
Environment Setup
To run Biomes locally, you'll need to have 64GB of memory.
Note that this repo supports dev containers so a quick way to setup your environment is to skip this section and start a codespace. Read on for manual instructions.
Install the Node version manager (https://github.com/nvm-sh/nvm).
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
# Restart console
nvm install v20
nvm use v20Install yarn
npm install -g yarn
Install Git LFS before cloning the repo or the binary files will have erroneous contents.
- On Ubuntu,
sudo apt-get install git-lfs
- On MacOS,
brew install git-lfs
- On Ubuntu,
Install Python version >=3.9,<=3.10
Install clang version >= 14
Install Bazel
npm install -g @bazel/bazelisk
Clone repo
git clone https://github.com/ill-inc/biomes-game.git
Run
git lfs pull
to ensure that the LFS files are up-to-date.Setup Python Virtual Environment (optional, but recommended)
python -m venv .venv
source .venv/bin/activateRun
pip install -r requirements.txt
to download python requirements.Install Redis 7.0.8
curl -s https://download.redis.io/releases/redis-7.0.8.tar.gz | tar xvz -C ${HOME} \
&& make -j`nproc` -C ${HOME}/redis-7.0.8 \
&& sudo make install -C ${HOME}/redis-7.0.8 \
&& rm -rf ${HOME}/redis-7.0.8
Run Biomes
- In the Biomes repository directory,
./b data-snapshot run
- Visit
http://localhost:3000
.
Coding Environment
- The recommended code editor is VSCode.
Developing inside a container
If you want to jump right in with a ready-to-go dev environment (enabling you to skip all of the "Environment setup" steps above), you can take advantage of VS Code's "Developing inside a Container" feature. See .devcontainer/README.md for instructions on how to set that up.
GitHub Codespaces
Building off the "Developing inside a container" support, you can also start
up a GitHub Codespace in this repository by clicking here. Make sure to choose "16-core" or better for "Machine type" (which should come with the required 64GB of memory). If you create a codespace, you should always open it in VS Code, not a browser, so that you can access the dev server at localhost:3000
, which a lot of the system is expecting.
Common problems and solutions
Discord error on startup
Disable Discord web hooks by adding:
discordHooksEnabled: false
Error when using social logins (Twitch/Discord/Google)
Social logins will not work if you don't have access to the required API keys. Hence, they will not work for the local build, and should not be used.
Invalid asset paths
Not found (404) errors of the form "Could not find <asset-path>/<name>-<hash>.<extension>
" are often caused by having out of date assets, from a previous ./b data-snapshot run
.
To fix this, run:
./b data-snapshot uninstall
./b data-snapshot pull
to fetch the most up to date assets.
Fails on login, or while creating an account
Don't use social login. Rather, create a new account using the developer workflow shown below.
- From
http://localhost:3000
, click "login". - From the login dialog, select "Login with Dev".
- From the developer login, "Create [a] New Account".
- This will prompt the intro scene.