GithubHelp home page GithubHelp logo

cbdevnet / xelflut Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 2.0 22 KB

Pretty fast server for multiplayer X11 canvas (pixelflut)

License: BSD 2-Clause "Simplified" License

C 98.34% Makefile 1.66%
pixelflut art multiplayer-canvas

xelflut's Introduction

xelflut

A multiplayer X11 canvas.

Based on the idea of pixelflut, as seen at EasterHegg '14.

Written directly against XRender so it should probably be pretty fast.

Version numbers approximate ฯ€.

The name

It's funny on so many levels, some of which come only with an understanding of the german language and more-or-less (probably less) great math and programming humour.

Features

  • IPv4 + IPv6 support
  • Configurable frame rates and limits
  • Configurable canvas dimensions
  • Uniform or anisotropic scaling and centering
  • Few dependencies / lightweight
  • Slim codebase (~900 LoC)
  • Alpha-transparency support

Building & Setup

Dependencies

  • A C compiler
  • (GNU) make
  • libx11(-dev)
  • libxrender(-dev)

Build process

Run make.

Setup

Configuration is done by passing arguments. Check the output of xelflut -h to see what is possible.

To install xelflut to the system (not in any way required), run make install.

Usage

Just run the resulting binary.

Run ./xelflut -h for some info on what you can do.

Within the window, press q to quit or c to clear the canvas.

By default, clients are limited to 50 pixels per frame (to change this, use the -l argument), 25 frames are rendered every second (configurable with -f). Clients exceeding the limits will be slowed down by default. This behaviour can be changed to one of the enforcement policies disconnect (Disconnect clients exceeding the limits), ignore (Ignore additional pixels until the next frame) or none (ignore the frame limit, keep other safeguards) with the -e <enforcer> option. Clients are allowed only one connection per host (though this can be circumvented by reasonably clever attackers). All limits and checks can be disabled (for example, for performance testing) by passing the -u option.

Protocol

Lines of ASCII text commands separated by \n via TCP on port 3141, unless you configure it differently (arguments -b and -p).

Send SIZE and the server responds with SIZE WIDTH HEIGHT

Send PX X Y RRGGBB or PX X Y RRGGBBAA to set a pixel to a hex color code.

There are some measures in place to limit the number of connections and pixels a client may have and set. Some are even configurable.

Bugs & Feedback

Please report bugs via the issue tracker.

If you use this on some kind of humungous screen or at a cool event, send me a picture ([email protected])!

xelflut's People

Contributors

cbdevnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

xelflut's Issues

overflow error, slow performance

Written directly against XRender so it should probably be pretty fast.

i detected the opposite while i expected the same...

when running via localhost i get overrun errors. i modified the code to ignore this state and the program works fine now. but it is incredible slow compared to the java version from https://github.com/defnull/pixelflut

what's wrong?

Minimize calls to memmove

Analysis with callgrind shows that most instruction cycles are spent within memmove (copyback after data handling) and strtoul (pixel color parsing).

To limit the number of copyback operations performed, handle all buffer lines consecutively, then move at once.

Fix the window background

I think I'm missing an alpha value on the window background.

Can be seen when running a canvas smaller than the window.

Center/Scale mode

When configuring canvas dimensions smaller than the host display, allow scaling or centering the canvas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.