Hercules is a C-based MMORPG server emulator for Ragnarok Online. It is a multi-process application suite: the login server handles account authentication and IP banning, the char server manages persistent character data, guilds, mail, pets, homunculi, and other account-wide state, the map server runs the real-time game world with combat, NPC scripting, instances, battlegrounds, item systems, and chat, and the API server exposes HTTP endpoints for external tools. All servers persist to MySQL/MariaDB through a shared SQL abstraction and communicate using custom binary inter-server packets. The architecture is modular at the subsystem level through interface structs containing function pointers, which also power a runtime plugin system (HPM). The primary data flow is: client packets arrive at login/char/map servers; map servers mutate real-time game state and delegate persistence to the char server; the char server executes SQL against the database; the API server proxies selected requests through login/char connections. External dependencies include MariaDB/MySQL, libconfig, cJSON, zlib, PCRE, GRF archive files, and bundled HTTP/multipart parsers. The codebase is actively maintained with CI covering GCC, Clang, MSVC, sanitizers, and multiple database backends, and it has recently transitioned toward CMake and Conan. However, it retains significant legacy weight: extensive PACKETVER conditionals, autogenerated packet header files, bundled third-party libraries, monolithic source files, and historical SQL migrations. It is a specialized game-server project rather than a general-purpose library, but several low-level infrastructure components are cleanly separated and reusable.
This repository is a Unity-based MMORPG framework that extends the MultiplayerARPG template to support a multi-server architecture with central, map, and database servers. The client provides a full pre-game UI flow (login, registration, server/channel selection, character creation) and in-game features such as guilds, parties, mail, cash shop, gacha, storage, and IAP validation. The server is component-based, with CentralNetworkManager handling authentication and character operations, MapNetworkManager managing per-map gameplay and persistence, and DatabaseNetworkManager abstracting SQLite/MySQL storage. Data flows involve periodic saving of player and building state via data updaters with hash-based change tracking, and caching of social data (parties, guilds) with configurable refresh intervals. External dependencies include LiteNetLib for networking, SQLite/MySQL for databases, and custom ASN.1 parsers for Apple/Google Play receipt validation. The codebase demonstrates modular design through interfaces (IDatabaseClient, IChatProfanityDetector, IIAPReceiptValidator) and reusable utilities (MiniJSON, Asn1Processor).
This repository implements a RuneScape game server emulator (build #435, October 2006) in TypeScript/Node.js. It provides a full multiplayer game world with player management, NPCs, skills (mining, woodcutting, smithing, firemaking, runecrafting, crafting, fletching, prayer, etc.), quests (Cook's Assistant, Witch's Potion, Goblin Diplomacy tutorial), combat, banking, shops, and item interactions. The server uses a tick-based game loop (600ms ticks) and supports multiple server roles (game, login, update) that can run standalone or together via a gateway server. The architecture is modular: a core engine provides an action pipeline for handling player events (object interaction, item use, commands, etc.), a task scheduler for delayed/tick-synced actions, a plugin system for content (skills, quests, NPCs, items), and a world manager with chunk-based map, collision detection, and pathfinding (A*). Networking uses custom packet handling with ISAAC cipher encryption. Configuration is data-driven: items, NPCs, shops, spawns, skill guides, and music regions are loaded from JSON/YAML files at startup. The system also integrates with the @runejs/filestore library to decode the game cache. Key entry points include src/server/runner.ts (launches servers), src/server/game/game-server.ts (sets up world and gateway), src/engine/action/action-pipeline.ts (central event dispatcher), and src/engine/plugins/loader.ts (auto-loads plugins from dist/plugins/). The codebase is actively developed but shows signs of technical debt: many TODO references to issue #417 (replacing setInterval with tick-synced code), deprecated patterns (actionsCancelled Subject), incomplete features (Construction skill stubbed, Prayer/Magic partly implemented), and inconsistent plugin module formats. Despite these issues, the core patterns (task system, action pipeline, plugin system) are well-designed and demonstrate non-obvious craftsmanship.
TravianZ is a self-hosted multiplayer browser strategy game server, a clone of the popular Travian game. It implements the complete game loop: village building, resource production, troop training, combat, hero system (T4), alliance management with bonuses, market trading, world wonders, and an admin panel for server management. The architecture is a PHP 8.3+/MySQL monolith with procedural entry points and class-based game logic. Key systems include a trait-based database layer (Database.php split into domain-specific traits), a cron-like automation engine (Automation.php split into traits), and a templating system using .tpl files. Features include support for 9 tribes, multi-language (English, French, Italian, Romanian, Chinese), Docker deployment, and an admin panel with CSRF protection and logging. The codebase has undergone significant refactoring from an older codebase, but still retains global state, mixed SQL access patterns (prepared statements alongside raw queries), and legacy JavaScript (MooTools). It is actively maintained with documented bug fixes and performance optimizations.