Sky Strife is an onchain RTS game built on the MUD framework.
Sky Strife's purpose is to explore the limits of what is possible in an onchain game, with the eventual goal of becoming an Autonomous World.
Sky Strife is broken into several sub-packages. Here are the packages that are essential to run the game:
packages/client
: Used to render and play the game in a browser.packages/contracts
: Contains all of the MUD contracts that make up a single Sky Strife world.packages/art
: Responsible for storing and exporting assets for Sky Strife. This also includes tooling for the Tiled map editor (map making tilesets, Tiled map files, and a plugin to export maps that are compatible with our template system).packages/ecs-browser
: Sidebar ECS browser for debugging component state and manually running queries. Used to be part of MUD but was moved back into Sky Strife as MUD development diverged from it.packages/phaserx
: A wrapper for Phaser 3 that was created at Lattice. Mainly used for strong types and easier setup. Vendored from the official MUD repo as we've made some changes to it.
node
- Version 18.16.1 or greaterfoundry
- Used to run your local node, run tests, and deploy contracts. Install
-
Install the latest forge using
foundryup
(see Foundry docs).If necessary, you can update to a new version of Rust.
rustup update
-
Clone the repository and install dependencies
git clone https://github.com/latticexyz/skystrife-public.git cd skystrife-public pnpm install
-
Start your local node, deploy contracts, and start the client.
pnpm dev
-
Browse to
http://localhost:1337
to view the client.If you get an error saying
The connected Sky Strife world is not valid.
, wait about a minute and reload. It takes some time for the contracts to build and deploy.You should automatically be connected as the admin of the world.
If you are okay with playing alone with no win condition, the standard dev setup will spawn test matches for you on a debugging map.
If you want to play against an opponent (yourself), these are the steps:
- Browse to
http://localhost:1337
to view the client as an administrator. - Press PLAY and then SKIP.
- Click + CREATE MATCH.
- Enter a match name, select a map (preferable for 2 players, easier to test), and then scroll down and click CREATE AND JOIN MATCH.
- Select a hero and click CREATE AND JOIN MATCH.
- Click PLAY.
To join as another player:
- Browse to
http://localhost:1337/?asPlayer
as a normal user. - Click PLAY and then SKIP.
- Click OPEN in the row for your match, and then join normally.
You can join a match as the administrator, a regular user, and another regular user in an incognito window. If you need to be more, you can use different browser profiles or different browsers.
If you want to make live changes to MUD while developing you will have to link the local MUD package to the client and contracts packages.
- Clone the MUD repo locally.
- Run
pnpm mud set-version --link <relative_path_to_mud_install>
in your local MUD repo.
The client is deployed automatically when a commit is pushed to any branch. By default https://playtest.skystrife.xyz
points to the latest playtest
branch commit. The client is hosted on Cloudflare Pages. See the github action description for details.
Contract deployment is currently manual.
To deploy to the Sky Strife testnet run pnpm deploy:garnet
in packages/contracts
. After deployment has finished, you'll need to make a commit with the worlds.json
changes and open a PR to the develop
branch. The live client uses this to determine which world to connect to.