Skip to content

Commit

Permalink
README changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kooshaba committed Jan 7, 2024
1 parent 32729e7 commit cb2d85c
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<a href="https://twitter.com/skystrifeHQ">
<img src="https://img.shields.io/twitter/follow/skystrifeHQ?style=social"/>
</a>
<a href="https://twitter.com/latticexyz">
<img src="https://img.shields.io/twitter/follow/latticexyz?style=social"/>
</a>

[![discord](https://img.shields.io/badge/join-latticexyz-black?logo=discord&logoColor=white)](https://discord.gg/latticexyz)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

![sky strife cloud background](packages/client/src/public/assets/background.png)

> **Sky Strife** is an on-chain RTS game built on the MUD framework.
# Project Structure

Sky Strife is broken into several packages.
Sky Strife is broken into several sub-packages. Here are the packages that are essential to run the game:

1. `packages/client`: Used to render and play the game in a browser.
2. `packages/contracts`: Contains all of the MUD contracts that make up a single Sky Strife world.
3. `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.
4. `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).
5. `packages/analytics`: Used to run historical gameplay analytics against a Sky Strife World.
6. `packages/bots`: A headless Sky Strife client and various bots used for automating in-game processes.
3. `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).
4. `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.
5. `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.

# Initial Dev Setup

Expand All @@ -24,38 +33,22 @@ Sky Strife is broken into several packages.
1. Install latest forge using `foundryup` (see [foundry docs](https://book.getfoundry.sh/getting-started/installation))
2. Run `pnpm` in the base directory to install all dependencies and compile contracts.
3. Run `pnpm dev` to start your local node, deploy contracts, and start the client.
4. Once the client starts you will just see a blank world. You will need to upload a map before you can spawn. First you'll need to make yourself an admin. To make yourself an admin, open your browser developer console and run this `localStorage.setItem('mud:burnerWallet', '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80')` (This is the default forge admin private key). Then refresh the page. You only need to do this step once per browser as long as you run the client on the same port.
5. Open the admin interface by pressing `` ` ``.
6. Use the file selector to find a map file. You can find some example maps in the top level `maps` directory. Once it is selected click the upload button. This will send a bunch of transactions to create the map and may take a moment.

# Using Local MUD

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.

## Steps

1. Clone the MUD repo locally.
2. Run `pnpm link:packages` in your local MUD repo.
3. Run `pnpm link:mud` in the top level of this repo.

# Contributing

After making the desired changes create a branch in the form `your_username/feature_name`.

Commit messages should follow conventional commit format. See [here](https://www.conventionalcommits.org/en/v1.0.0/) for more details.

Then push your branch and open a PR to the `develop` branch.

PRs should be reviewed by at least one other person before merging. Merge strategy should be set to `Squash and Merge` when ready.
2. Run `pnpm mud set-version --link <relative_path_to_mud_install>` in your local MUD repo.

# Live Deployment

## Client

The client is deployed automatically when a commit is pushed to any branch. By default `https://playtest.skystrife.xyz` points to the latest `develop` commit. The client is hosted on Cloudflare Pages. See [the github action description](.github/workflows/build-client.yml) for details.
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](.github/workflows/build-client.yml) for details.

## Contracts

Contract deployment is currently manual.

To deploy to the Sky Strife testnet run `pnpm deploy:testnet` 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.
To deploy to the Sky Strife testnet run `pnpm deploy:redstone-holesky` 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.

0 comments on commit cb2d85c

Please sign in to comment.