How dawidg81/sn works
Supernova is a Minecraft Classic/ClassiCube multiplayer server. A client connects and identifies; the server validates its protocol, authentication and ban status, sends the world and player state, then handles chat, commands, movement and block updates. World data is loaded and saved locally, while a separate heartbeat advertises the server to ClassiCube. The graph reflects the sampled C implementation and README; physics is described as TODO, not an implemented stage.
Main entry points: game.h Session handler · player.h Player state & policy · level.h Level data & transfer · main.c Startup & lifecycle
Components 15
Server Runtime
- Startup & lifecycle
src/main.c - TCP listener
src/socket.h - Session handler
src/game.h - Chat commands
src/cmds.h
Client Protocol
- Player state & policy
src/player.h - Packet encoding
src/server.h - Wire-format helpers
src/network_utils.h
World State
- Level data & transfer
src/level.h - World save file
level.bin
Authentication & Discovery
- MD5 verification
src/crypt.h - Server salt
src/attr.h - Server heartbeat
src/heartbeat.h
Other components
- Server operator
- Game client
- ClassiCube directory
Connections 23
- Server operator → Startup & lifecycle: starts server
src/main.c - Startup & lifecycle → Level data & transfer: initializes and loads
src/main.c - Startup & lifecycle → TCP listener: opens listener
src/main.c - Startup & lifecycle → Server heartbeat: starts heartbeat
src/main.c - Startup & lifecycle → Session handler: starts connection loop
src/main.c - Game client → Session handler: connects and sends packets
src/game.h - Session handler → Player state & policy: parses and checks player
src/game.h - Session handler → MD5 verification: checks verification hash
src/game.h - Session handler → Server salt: uses server salt
src/game.h - Session handler → Level data & transfer: sends level
src/game.h - Session handler → Packet encoding: sends player packets
src/game.h - Session handler → Chat commands: dispatches slash commands
src/game.h - Session handler → Player state & policy: applies block updates
src/player.h - Chat commands → Player state & policy: checks admin status
src/cmds.h - Chat commands → Level data & transfer: saves world
src/cmds.h - Player state & policy → Level data & transfer: writes block changes
src/player.h - Player state & policy → Wire-format helpers: decodes packet fields
src/player.h - Packet encoding → Wire-format helpers: encodes packet fields
src/server.h - Level data & transfer → Wire-format helpers: encodes dimensions
src/level.h - Level data & transfer → World save file: reads and writes
src/level.h - Server heartbeat → Player state & policy: counts connected players
src/heartbeat.h - Server heartbeat → ClassiCube directory: advertises server
src/heartbeat.h - Session handler → Game client: sends world and updates
src/game.h