xelflut: Multiplayer canvas using a simple text-based protocol

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
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 ( cb@cbcdn.com
)!

Github责编内容来自:Github (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合编程 » xelflut: Multiplayer canvas using a simple text-based protocol

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录