Skip to content

Build a spaceship out of ASCII Symbols and fight in a 2 Player deathmatch

Notifications You must be signed in to change notification settings

Bobscorn/text-sub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Textship

Build a spaceship out of ASCII Symbols and fight in a 2 Player deathmatch.

Setup Bevy to run in the browser

  • On Linux:

    rustup target install wasm32-unknown-unknown
    
    cargo install wasm-pack
    
    sudo apt-get install npm wasm-bindgen lld
    
        or sudo pacman -S lld
    
    cargo install wasm-server-runner
    
    cargo install cargo-watch
    
    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sudo sh
    
    # (Optional) Install the signalling server
    cargo install matchbox_server
    
  • On Windows (WSL):

    rustup target install wasm32-unknown-unknown
    
    cargo install wasm-pack
    
    sudo apt-get install npm wasm-bindgen
    
    cargo install wasm-server-runner
    
    cargo install cargo-watch
    
    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
    
    cargo install matchbox_server
    
    cargo install -f cargo-binutils 
    
    rustup component add llvm-tools-preview
    

Client: Run a development build

  • Start the wasm-server-runner:

    cargo run --target wasm32-unknown-unknown
    
  • Open a browser tab at 127.0.0.1:1334 (or whatever the port is).

  • Run the signalling server locally:

    matchbox_server
    

Multiple tabs can connect to the wasm-server-runner, which means you can run multiple clients on the same machine.

Client: Run tests

wasm-pack test --headless --firefox

Client: Build a release

wasm-pack build --release --target bundler --out-dir target/bundle

FAQ

My ships don't move when I open two tabs!

This is a known bug with the ship detection algorithm. It will work with multi windows and real 2 player scenarios.

Libraries

About

Build a spaceship out of ASCII Symbols and fight in a 2 Player deathmatch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages