这个项目能做什么

# Moon Moon 是一个使用 C++23 实现的基于 Actor 模型的轻量级游戏服务器框架。一个工作线程可以承载一个或多个 actor(服务),它们通过消息队列进行通信。 ## 特性 - **跨平台**:Windows(VS2022 17.5+)、Linux(GCC 13+)、macOS(Clang 16+) - **网络**:TCP、UDP/KCP、WebSockets、HTTP,性能经过优化 - **Lua 脚本**:逻辑由 Lua 驱动,支持异步协程,用于套接字、定时器、服务间/进程间通信 - **数据库客户端**:Redis、PostgreSQL、MongoDB 和 MySQL 的异步驱动 - **库**:优化的 Lua JSON 库、Lua Protobuf、Lua 文件系统、用于排行榜的 Lua zset - **导航**:集成 Recast Navigation - **架构简单**:源码简洁、易于理解 - **基于 ASIO 的调度** ## 快速开始 ```shell # 运行测试 ./moon example/test/main_test.lua # 运行示例脚本 ./moon example/example_timer.lua ./moon example/main_game.lua ``` ## 构建 1. 安装 C++23 编译器(VS2022 17.5+、GCC 13+ 或 Clang 16+) 2. 安装 [premake5](https://premake.github.io/download) 3. 克隆仓库 4. 构建:`premake5 build --release` 5. 运行:`premake5 run --release example/send_benchmark.lua` ## 社区 - [Gitter](https://gitter.im/undefined/community) - [Wiki/文档](https://github.com/sniper00/moon/wiki) - QQ 群:543833695 ## 扩展 更多库可在 https://github.com/sniper00/lrust 获取 ## 演示 [MoonDemo](https://github.com/sniper00/MoonDemo.git) ## 使用案例 使用 Moon 构建的游戏包括 *Age of Kita* 和 *战神遗迹*。 ## 相关项目 - [NoahGameFrame](https://github.com/ketoo/NoahGameFrame)