dalton-oliveira / snake-rs

A multiplayer Snake game implemented in Rust, which tries to get closer to Nokia's gaming aesthetic. Front-end mainly compiled for WASM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is an attempt to mimic Nokia Snake game while learning Rust, so suggestions are more than welcome! It's using Salvo as backend which sends game state data via websocket, so yes it's designed to be multiplayer. Front-end is mainly done with wasm.

snake-web

Run (Docker)

docker-compose build && docker-compose up

Run

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install wasm-bindgen-cli

Add WASM as target

rustup target add wasm32-unknown-unknown
./build.sh
cargo run -p snake-web

Run on terminal

Press q to quit

cargo run -p snake-termion

snake-termion

Roadmap

  • Trace backend and front-end calls with Open Telemetry
  • Experiment WebRTC in order to reduce latency
  • Add unit and integration tests
  • Run it on a embedded system with restricted memory and processing power
  • Large world where the snake can navigate to stress test chosen data structures
  • Other game elements such as walls and wormholes
  • Graceful shutdown

About

A multiplayer Snake game implemented in Rust, which tries to get closer to Nokia's gaming aesthetic. Front-end mainly compiled for WASM

License:Other


Languages

Language:Rust 77.9%Language:JavaScript 16.8%Language:CSS 2.1%Language:Dockerfile 1.5%Language:HTML 1.3%Language:Shell 0.5%