Skip to content

Commit

Permalink
markdownlint
Browse files Browse the repository at this point in the history
  • Loading branch information
simbleau committed Mar 4, 2023
1 parent 94beb00 commit 7cd26e0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ PRs welcome!

If you have questions or suggestions, feel free to make an [issue](https://github.com/johanhelsing/matchbox/issues). There's also a [Discord channel](https://discord.gg/Rzw8f9cY) if you want to get in touch.

## Thanks!
## Thanks

- A huge thanks to Ernest Wong for his [Dango Tribute experiment](https://github.com/ErnWong/dango-tribute)! `matchbox_socket` is heavily inspired its wasm-bindgen server_socket and Matchbox would probably not exist without it.

Expand Down
24 changes: 17 additions & 7 deletions examples/bevy_ggrs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
Shows how to use `matchbox_socket` with `bevy` and `ggrs`, to create a simple working browser "game" (if moving cubes around on a plane can be called a game).

## Live Demo

There is a live version here (move the cube with WASD):

- 2-Player: https://helsing.studio/box_game/
- 3-Player: https://helsing.studio/box_game/?players=3
- 2-Player: <https://helsing.studio/box_game/>
- 3-Player: <https://helsing.studio/box_game/?players=3>
- N-player: Edit the link above.

When enough players have joined, you should see a couple of boxes, one of which
Expand All @@ -16,32 +17,41 @@ You can open the browser console to get some rough idea about what's happening
(or not happening if that's the unfortunate case).

## Instructions

- Run the matchbox-provided [`matchbox_server`](../../matchbox_server/) ([help](../../matchbox_server/README.md)), or run your own on `ws://localhost:3536/`.
- Run the demo (enough clients must connect before the game stats)
- [on Native](#run-on-native)
- [on WASM](#run-on-wasm)

## Run on Native
```

```sh
cargo run [--matchbox ws://127.0.0.1:3536] [--players 2] [--room <name>]
```

## Run on WASM

### Prerequisites

Install the `wasm32-unknown-unknown` target
```

```sh
rustup target install wasm32-unknown-unknown
```

Install a lightweight web server
```

```sh
cargo install wasm-server-runner
```

### Serve
```

```sh
cargo run --target wasm32-unknown-unknown
```

### Run

- Use a web browser and navigate to <http://127.0.0.1:1334/?players=2>
- Open the console to see execution logs
- Open the console to see execution logs
20 changes: 15 additions & 5 deletions examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,41 @@
Shows how to use `matchbox_socket` in a simple example.

## Instructions

- Run the matchbox-provided [`matchbox_server`](../../matchbox_server/) ([help](../../matchbox_server/README.md)), or run your own on `ws://localhost:3536/`.
- Run the demo
- [on Native](#run-on-native)
- [on WASM](#run-on-wasm)

## Run on Native
```

```sh
cargo run
```

## Run on WASM

### Prerequisites

Install the `wasm32-unknown-unknown` target
```

```sh
rustup target install wasm32-unknown-unknown
```

Install a lightweight web server
```

```sh
cargo install wasm-server-runner
```

### Serve
```

```sh
cargo run --target wasm32-unknown-unknown
```

### Run

- Use a web browser and navigate to <http://127.0.0.1:1334>
- Open the console to see execution logs
- Open the console to see execution logs
8 changes: 5 additions & 3 deletions matchbox_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
A lightweight signalling server with some opinions, to work with all [examples](../examples/).

## Next rooms

This signalling server supports a rudimentary form of matchmaking. By appending `?next=3` to the room id, the next three players to join will be connected, and then the next three players will be connected separately to the first three.

You can also use the room id for scoping what kind of players you want to match. i.e.: `wss://match.example.com/awesome_game_v1.1.0_pvp?next=2`

# Run
```
## Run

```sh
cargo run
```
```

0 comments on commit 7cd26e0

Please sign in to comment.