libspades is a client/server C library for the "classic" version of the game Ace of Spades by Ben Aksoy. Currently it mostly supports version 0.75 and does not support version 0.76, but full support for both version 0.75 and version 0.76 is planned. --- Prerequisites --- Install the following libraries: - ENet (http://sauerbraten.org/enet/) - libcurl (https://curl.se/libcurl/) - zlib (https://zlib.net/) - cJSON (https://github.com/DaveGamble/cJSON) Copy config.def.h to config.h --- Building --- Compile with the flags which follow: -lcjson -lenet -lcurl -lm -lz or use tup. --- Q&A --- Q: Why document the entire protocol here when piqueserver already provides documentation? A: The piqueserver docs are incomplete, incorrect, and all crammed into one page, making it hard to give details without making it impossible to look through (smaller size was chosen over completeness in that case). Also, this gives me the opportunity to point out "a few" piqueserver bugs, many of which still exist today, via the use of the piqueserver bugs page linked below. Q: Why use C? Why not use Rust/Go/JavaScript/C++/whatever else? A: It's not a scripting language, isn't gigantic, is very fast, doesn't turn my data into a function, and has a nice syntax. It is also simple (at least for me) to understand and use. That and the fact that ENet and zlib and all the other libraries work natively with it, and don't need some glitchy python port which creates ghost players and things. Q: Can I run this on my potato? A: It should hypothetically run on anything that ENet, zlib and libcurl have been ported to, although I have only tested an x86-64 PC running Arch Linux (https://archlinux.org/) and that which is described below. Q: What if my potato really really sucks? A: libspades has been tested to work on a Raspberry Pi 3 Model B+ (https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/) running Arch Linux Arm (https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3) (ARMv7) with a chat/middleman client of mine. Q: Those are all just Linux! A: It works on a x86-64 OpenBSD 7.3 QEMU/KVM virtual machine with 10 GiB of non-volatile storage, a single thread and 512 MiB of RAM. Q: What if I wanted to run it on a graphing calculator? A: The ability to run libspades on a graphing calculator will happen when I can find a calculator, but for now libspades does not have said ability.