Skip to content

Latest commit

 

History

History

bevy_ggrs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Bevy + GGRS

Shows how to use matchbox_socket with bevy and ggrs using bevy_matchbox and bevy_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):

When enough players have joined, you should see a couple of boxes, one of which you can move around using the WASD keys.

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 (help), or run your own on ws://localhost:3536/.
  • Run the demo (enough clients must connect before the game stats)

Run on Native

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

Run on WASM

Prerequisites

Install the wasm32-unknown-unknown target

rustup target install wasm32-unknown-unknown

Install a lightweight web server

cargo install wasm-server-runner

Serve

cargo run --target wasm32-unknown-unknown

Run