Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs updates ahead of 0.6 #169

Merged
merged 9 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [![Matchbox](matchbox_logo.png)](https://github.com/johanhelsing/matchbox)
# [![Matchbox](https://raw.githubusercontent.com/johanhelsing/matchbox/main/images/matchbox_logo.png)](https://github.com/johanhelsing/matchbox)

[![crates.io](https://img.shields.io/crates/v/matchbox_socket.svg)](https://crates.io/crates/matchbox_socket)
![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)
Expand All @@ -10,15 +10,21 @@ Painless peer-to-peer WebRTC networking for rust's native and wasm applications.
The goal of the Matchbox project is to enable udp-like, unordered, unreliable
p2p connections in web browsers or native to facilitate low-latency multiplayer games.

| Channel | Ordered | Unordered |
| ---------- | ------- | --------- |
| Reliable | ✓ | ✓ |
| Unreliable | ✓ | ✓ |

- [Introductory blog post](https://johanhelsing.studio/posts/introducing-matchbox)
- [Tutorial for usage with Bevy and GGRS](https://johanhelsing.studio/posts/extreme-bevy)

The Matchbox project contains:

- A socket abstraction, [matchbox_socket](https://github.com/johanhelsing/matchbox/tree/main/matchbox_socket)
- With a feature, `ggrs` for providing a [ggrs](https://github.com/gschup/ggrs) compatible socket.
- A tiny signaling server, [matchbox_server](https://github.com/johanhelsing/matchbox/tree/main/matchbox_server). Written in rust, uses only a couple of megabytes of memory. Also available as a docker image. Compatible with all demos.
- A signaling server API, [matchbox_signaling](https://github.com/johanhelsing/matchbox/tree/main/matchbox_signaling). For DIY signaling servers and hookable callbacks, this may be useful if you plan a complicated matchmaking procedure.
- [matchbox_socket](https://github.com/johanhelsing/matchbox/tree/main/matchbox_socket): A socket abstraction for Wasm or Native, with:
- `ggrs`: A feature providing a [ggrs](https://github.com/gschup/ggrs) compatible socket.
- [bevy_matchbox](https://github.com/johanhelsing/matchbox/tree/main/bevy_matchbox): A `matchbox_socket` integration for the [Bevy](https://bevyengine.org/) game engine
- [matchbox_signaling](https://github.com/johanhelsing/matchbox/tree/main/matchbox_signaling): A signaling server library, with ready to use examples
- [matchbox_server](https://github.com/johanhelsing/matchbox/tree/main/matchbox_server): A ready to use full-mesh signalling server

## Examples

Expand All @@ -29,6 +35,9 @@ The Matchbox project contains:

## How it works

![Connection](https://raw.githubusercontent.com/johanhelsing/matchbox/main/images/connection.light.excalidraw.svg#gh-light-mode-only)
![Connection](https://raw.githubusercontent.com/johanhelsing/matchbox/main/images/connection.dark.excalidraw.svg#gh-dark-mode-only)
johanhelsing marked this conversation as resolved.
Show resolved Hide resolved

WebRTC allows direct connections between peers, but in order to establish those connections, some kind of signaling service is needed. `matchbox_server` is such a service. Once the connections are established, however, data will flow directly between peers, and no traffic will go through the signaling server.

The signaling service needs to run somewhere all clients can reach it over http or https connections. In production, this usually means the public internet.
Expand Down
Loading