- SDL2 and SDL2 development Headers (Example for Fedora)
dnf install SDL2 SDL2-devel
git clone https://github.com/heiziff/pixelfold.git
cd pixelfold
stack build
- Binaries compiled via
stack buildare only runnable from the project directory. If you want to be able to run pixelfold from anywhere, consider usingstack installor simply download the latest release from github. - To build, the Haskell Stack build system is required. Can be installed via GHCup
stack exec pixelfold-exe <portnumber>
./pixelfold-exe <portnumber>
The server then listens for TCP messages on Port <portnumber> or Port 4242, if none was specified.
The server accepts the following Commands:
-
Draw: colors the pixel at position (pos_x, pos_y) with the 32-bit color value 0xAARRGGBB
- Format: "PX <pos_x> <pos_y> AARRGGBB\n"
-
Help: Sends back the help text
- Format: "HELP\n"
-
Size: Returns the size of the Canvas
- Format: "SIZE\n"
-
GetPixel: Returns the current color at Position (pox_x, pox_y)
- Format: "PX <pos_x> <pos_y> \n"