/pixeldike

[Mirror of https://git.lly.sh/ftsell/pixeldike] Pixel drawing game for programmers

Primary LanguageRustMIT LicenseMIT

pixeldike

crates.io Crate Documentation

A fast and reusable pixelflut implementation

Pixelflut is a competitive programing game that provides a 2D pixel canvas upon which many people can set single color values over the network.

Logo

The implementation contained in this repository is done in Rust and includes a reusable library as well as a standalone binary. The library

Features

The following features are implemented:

  • Generic protocol serialization and parsing
  • TCP Transport
  • UDP Transport
  • WebSocket Transport
  • Unix socket Transport
  • Live-Streaming of the servers canvas via RTMP/RTSP
  • Live-Display of the servers canvas via a window or linux framebuffer device
  • Drawing of images (and colored rectangles) on a remote servers canvas

Installation

Install via cargo from source

This installation methods assumes you already have a working rust toolchain and a working cargo command. If you do you can run the following:

cargo install --git=https://github.com/ftsell/pixeldike.git --all-features --bin=pixeldike

With Nix

Nix (and Lix) users can build and run pixeldike using flakes:

nix run github:ftsell/pixeldike -- --help

The flake definition contains the outputs listed below for the systems aarch64-darwin, aarch64-linux, x86_64-darwin and x86_64-linux, however only x86_64-linux has currently been tested.

github:ftsell/pixeldike
├───apps
│   ├───<system>
│   │   ├───default: app
│   │   └───pixeldike: app
├───devShells (omitted)
└───packages
    └───<system>
        ├───default: package 'pixeldike'
        └───pixeldike: package 'pixeldike'

Usage examples

  • Retrieve command-line help

    pixeldike -h
    pixeldike server -h
  • Start a pixelflut tcp server on port 1234 with default size and persisted in the file ~/pixmap.pixmap

    pixeldike server --file ~/pixmap.pixmap --tcp 1234
  • Start a pixelflut udp server on port 1234 with custom size and persisted in the file ~/pixmap.pixmap

    pixeldike server --file ~/pixmap.pixmap --udp 1234 --width 10 --height 20