Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.
APACHE-2.0 License
Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.
This project is in an early stage, so many features are missing and need to be implemented. However, as stated initially, the goal is not to propose a real game but a demo to explain and share these technologies.
Right
and left
arrow keys to turn the ship right and left.Space
key to shoot.F
key to display fps.Esc
key to quit the game.An online demo can be played here.
Note:
Native application:
Running the wasm application into Firefox:
Multiplayer game:
Binaries are available here: Binary releases
git clone https://github.com/uggla/planetoid
cd planetoid
dnf install java-11-openjdk-devel
dnf install maven
cd worker
mvn compile quarkus:dev
Note: Maven will download a lot of dependencies from the internet
Install Rust following the instructions here.
Tips: the rustup method is the simplest one.
Install required library for macroquad
apt install pkg-config libx11-dev libxi-dev libgl1-mesa-dev libasound2-dev
dnf install libX11-devel libXi-devel mesa-libGL-devel alsa-lib-devel
No dependencies are required for Windows or MacOS
cd client
cargo run
Follow the above instruction of the native client.
Install basic-http-server
cargo install basic-http-server
rustup target add wasm32-unknown-unknown
cd client
cargo build --target wasm32-unknown-unknown
basic-http-server
xdg-open http://127.0.0.1:4000
Planetoid 0.1.0
Planetoid is an asteroid clone.
USAGE:
planetoid [FLAGS] [OPTIONS]
FLAGS:
-d, --debug Debug mode (_ (error), -d (info), -dd (debug), -ddd (trace))
-g, --god God mode
--help Prints help information
-s, --solo Solo mode, do not connect to network
-V, --version Prints version information
OPTIONS:
-h, --host <host> Host [default: localhost]
-m, --mode <mode> Network mode [default: host] [possible values: host, guest, spectator]
-n, --name <name> Player name [default: planetoid]
-p, --port <port> Port [default: 8080]
cargo run -- -s
On the first terminal:
cargo run -- -m host -n Planetoid
On the second terminal:
cargo run -- -m spectator -n "Planetoid spectator"
-dd
: debug, allows to see messages sent to the web socket.
-g
: god mode, player ship cannot be destroyed.
-n
: player name (default: planetoid)
cargo run -- -m host -dd -g -n Planetoid
On the first terminal:
cargo run -- -m host -n Planetoid
On the second terminal:
cargo run -- -m guest -n "Planetoid guest"