Craftd:Main Page

Welcome to the craftd wiki page. craftd lives at http://mc.kev009.com/craftd/.
You can find the latest source on github: https://github.com/kev009/craftd/.
Introduction
craftd is a third-party implementation of the Minecraft SMP server protocol.
The goal of craftd is to provide a high performance, low overhead implementation of the Minecraft Survival Multiplayer (SMP) protocol. After implementing the basics, advanced features such as scripting and extensions shall be considered.
craftd keeps modern UNIX daemon philosophy in mind. This includes best practice like async polling I/O, multi-threading, and use of high quality libraries whenever possible. craftd is written in C99 and the current plan is to extend it with Python for scripting.
Check back soon for a test world. Shout out to Coestar for providing me with a copy of Minecraft and the motivation for the project.
Status
craftd is on github. This is a developer preview for feedback. It doesn't currently implement much of the Minecraft protocol, but you can follow along and track progress. Check back later for release tarballs and eventually binaries.
Things that have been hashed out:
- Autotools build system for cross-platform ease & possible distro inclusion
- libevent2 cross-platform event polling and network I/O
- Fast packet state machine and variable length packet decoder
- Pthreads worker pool
- libevent2 integrated httpd
- Daemon basics -- need conventional SIG handlers, SIGHUP, pid locks
- Choose a FOSS license -> Simplified BSD
- Logging. XSI/Single UNIX Specification syslog most likely. -> syslog with alternative stdout selector at runtime.
- Configuration files -> JSON formatted
- Chat, motd, string handling (bstring)
- Basic NBT read and write support
- Chunk sending
Future directions/TODO:
These are future research and development ideas in arbitrary order.
- World file format. custom w/import-export? BerkeleyDB?
- Sparse matrix for ^?
- Binaries for Linux, Win32(MinGW), FreeBSD
- Stress test w/large num users - Goal 100+ simultaneous
- Dynamically tunable worker pool
- Use more zero copy I/O
- JSON-REST admin/status API
- Security audit - perpetual
- Running from a chroot
- Native WIN32 threading & MSVC support - needs a contributor/maintainer
- Protocol testing framework
- IPC to an IRC relay agent
- Alternative/improved protocol for NPCs, bots, scripting?
User Documentation
Developer Documentation
- Thread Model
- Coding Style and Notes
- libevent book
- libevent2 Doxygen - Local, up to date copy
- C99 Info
- POSIX1-2008