Skip to content

Commit

Permalink
Add square_eater README
Browse files Browse the repository at this point in the history
  • Loading branch information
leudz committed Aug 21, 2021
1 parent 1b8b720 commit eb08993
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions square_eater/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Square eater

In a world where all round shapes have disappeared.
You are a lone square trying to get bigger in order to survive the continuous red square attacks.
When all hope is lost, only the legendary gold square can save you!
[Play Online](https://leudz.github.io/shipyard/square_eater)

Inspired by Erik Hazzard's [Rectangle Eater](http://erikhazzard.github.io/RectangleEater/).

### Build native

Square eater uses `Macroquad`, you might need to install some dependencies. See [their README](https://github.com/not-fl3/macroquad).

Then when inside the `square_eater` directory you can use regular `cargo` commands to `build` or `run` the game.

### Build WASM

Using [`cargo make`](https://crates.io/crates/cargo-make) so simplify building.
When in the root directory, build square_eater in release mode, all files will be in the `square_eater/public` directory.

```shell
cargo make square_eater
```

Or if you don't want to use `cargo make`, when in the `square_eater` directory.

```shell
cargo build --release --target wasm32-unknown-unknown
mv ../target/wasm32-unknown-unknown/release/square_eater.wasm ./public/
```

I'm using [`microserver`](https://crates.io/crates/microserver) to make the server.

```shell
microserver square_eater/public
```

Square eater is now accessible at `http://localhost:9090/` (the port might be different if you are using a different tool to make the server).

0 comments on commit eb08993

Please sign in to comment.