$ show suriyun-mmorpg/UnityMultiplayerARPG_MMO
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).
The LLM identified 3 files worth highlighting for reuse:
A standalone, lightweight JSON serializer and deserializer implemented in pure C#. It handles basic JSON types (objects, arrays, strings, numbers, booleans, null) and is used throughout the project for configuration and network messages. The implementation is self-contained with no external dependencies, making it directly extractable into any C# project for JSON manipulation.
A reusable ASN.1 node representation that models the hierarchical structure of ASN.1 encoded data (commonly used in X.509 certificates and Apple/Google Play receipts). It provides methods for parsing, traversing, and extracting data from ASN.1 sequences. The implementation is independent of the IAP validation context and can be reused in any project requiring ASN.1 decoding, such as certificate chain validation or cryptographic data parsing.
Implements a periodic data persistence pattern for game entities. It tracks changes to player character state by computing a hash of the current data and comparing it to the last saved hash. Only when changes are detected does it trigger a database save, reducing write load. The updater runs on a configurable interval and includes retry logic. This pattern is reusable for any entity that requires periodic persistence with change detection, such as inventory, quest progress, or building state.