LucasPickering / terra-rs

Hexagon tile-based terrain generation system.

Home Page:https://terra.lucaspickering.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terra-rs

Try it out! terra.lucaspickering.me

Hexagon tile-based terrain generation system. A series of configurable algorithsm can generated varied and realistic terrain.

Usage

Want to use Terra? It has a native Rust interface, as well as a WebAssembly interface. View the code in demo/ for an example of how to create Terra configs and generate worlds from Wasm.

Development

Prerequisites

Running the Demo

There is a minimal in-browser demo that's very useful for development.

cd demo
npm install
npm run start

This will build the project and start an HTTP server on http://localhost:3000.

Deployment

Deployed through GitHub pages. Any push to master will trigger the CI to rebuild, which will updated the deployment.

Rust Nightly

Currently we use Rust nightly because of a handful of features. Once this list gets down to zero, we can switch to stable.

Troubleshooting

ARM + wasm-pack

If you're running on a Mac M1 or any other ARM system and get this error when trying to run the demo:

Error: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target!
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`

Then make sure your installation of wasm-pack is at least version 0.10.2. You can check with:

wasm-pack --version

You can upgrade by reinstalling with the link above.

About

Hexagon tile-based terrain generation system.

https://terra.lucaspickering.me

License:MIT License


Languages

Language:Rust 99.8%Language:Python 0.2%