How finorak/answer-protocol works
This is a text-based multiplayer dungeon game with a TCP server, CLI and SDL GUI clients, and a JSON-defined world. The main workflow is client connection and command submission, server-side validation and world interaction, then responses or events shown to players. Major domain stages include world loading/validation, movement and combat, quests, chat, and groups. The GUI adds connection, environment, inventory, and protocol views. Source excerpts show some wiring; README statements support documented capabilities where implementation excerpts are unavailable.
Main entry points: main.c TCP server · parser_utils.c World initialization · Server.cpp GUI server link · execution Game commands
Components 18
Player clients
- CLI client
client/main.c
Server runtime
- TCP server
server/main.c - Command validation
server/val_exec.c - Game commands
server/execution - Player and group management
server/tools
World data
- World initialization
parser/parser_utils.c - World entity extraction
parser/data_extractor - World validation
parser/data_validator - In-memory world
includes/world.h
GUI experience
- GUI application
gui/main.cpp - Connection page
gui/components/page/Connect.cpp - GUI server link
gui/Server.cpp - World interface
gui/components/features/Environment.cpp - Inventory and protocol
gui/components/features - UI components
gui/components/basic
Other components
- Player
- World JSON
- Game server
Connections 22
- Player → CLI client: uses
README.md - Player → GUI application: uses
README.md - CLI client → Game server: connects to
README.md - GUI application → Connection page: opens
gui/main.cpp - Connection page → GUI server link: connects through
gui/components/page/Connect.cpp - GUI server link → Game server: sends requests
README.md - GUI server link → Inventory and protocol: dispatches events
gui/Server.cpp - World interface → GUI server link: requests actions
gui/components/features/Environment.cpp - World interface → UI components: renders with
gui/components/features/Environment.cpp - GUI application → World interface: shows
- Game server → TCP server: reaches
README.md - TCP server → World initialization: initializes
server/main.c - TCP server → Command validation: validates commands
server/main.c - TCP server → Game commands: dispatches commands
README.md - Game commands → In-memory world: acts on
- TCP server → Player and group management: manages players
server/main.c - World initialization → World entity extraction: uses extractors
parser/parser_utils.c - World initialization → World validation: validates world
- World initialization → World JSON: loads
- World initialization → In-memory world: populates
- TCP server → In-memory world: updates during play
server/main.c - Game commands → Player and group management: supports group actions
README.md