Skip to content

Latest commit

 

History

History
114 lines (73 loc) · 3.73 KB

README.md

File metadata and controls

114 lines (73 loc) · 3.73 KB

Super Metroid Map Rando

This is the repository for the Super Metroid Map Rando project, which randomly rearranges how the Super Metroid rooms connect to each other, creating fresh randomized worlds for players to explore.

Development

If you are interested in contributing, feel free to reach out on the Discord. There are a few ways to run the randomizer for development, described in detail below.

  • Run the web service using Docker
  • Run the web service using Cargo
  • Run the CLI using Cargo

Using Windows

If you are running on Windows, be sure to enable symlinks in Git before cloning the repository:

git config --global core.symlinks true

You likely also need to enable "Developer Mode" in Windows settings in order for Git to have permissions to create symlinks.

Clone the repository

Clone the repository:

git clone --recurse-submodules https://github.com/blkerby/MapRandomizer
cd MapRandomizer

Run the web service using Docker

Install Docker if it is not already installed on your system.

Docker Compose build and run

docker-compose up --build

Manual Docker build and run

Build the Docker image:

docker build . -t map-rando

Run the web service:

docker run -p 0.0.0.0:8080:8080 map-rando /rust/maprando-web --seed-repository-url mem

Open a browser and navigate to localhost:8080 and you should see your locally running copy of the Map Rando website.

With the option "--seed-repository-url mem", any randomized seeds that you generate are stored in memory. You can also use "--seed-repository-url file:my-seeds" to store the seed data as local files under "my-seeds", where you could inspect the data.

Run the web service using Cargo

Building and running locally using Cargo is generally faster than using Docker, as you can take advantage of incremental compilation.

Install the stable Rust toolchain (e.g. using rustup).

After cloning the GitHub repository, download and extract required external data, which includes the randomized map pools and the Mosaic theming patches:

sh scripts/download_data.sh

Optionally, if you want to build and use the WebAssembly (for the boss calculator):

cd rust
cargo install wasm-pack
cd maprando-wasm
wasm-pack build --target="web" --release
cd ../..

Run the web service:

cd rust
cargo run --bin maprando-web -- --seed-repository-url mem

Use local copy of videos

If you want to be able to have full functionality of the site while offline, including being able to browse the library of videos in the Logic pages, a local copy of the video library can be downloaded or synced as follows:

sh scripts/download_videos.sh

This will require at least 10 GB of disk space; running this multiple times will only download files that are new or have been updated. Then run the randomizer using the --video-storage-path option to point the randomizer to the local copy of the videos:

cd rust
cargo run --bin maprando-web -- --seed-repository-url mem --video-storage-path ../map-rando-videos

Run the CLI using Cargo

As an alternative to using the web service, a CLI tool can also be used to generate a seed, to get results with fewer steps. At the moment, the CLI tool has many randomization options hard-coded into it and is intended for development rather than general use.

After cloning the GitHub repository and downloading/extracting the maps (as above), run the CLI tool like this:

cd rust
cargo run --bin maprando-cli -- --map ../maps/v110c-wild/10000.json --input-rom YOUR-PATH-TO-VANILLA-ROM --output-rom OUTPUT-ROM-FILENAME