文章摘要
Moongate是一个用C#从头构建的现代《网络创世纪》服务器,采用AOT编译以实现高性能,旨在提供怀旧的游戏体验。
文章总结
Moongate v2 - 现代《网络创世纪》服务器项目
项目概述
Moongate v2 是一个用C#从头构建的现代《网络创世纪》(Ultima Online)服务器项目,采用AOT编译以实现高性能,旨在提供怀旧游戏体验。
主要特性
- 技术架构:基于.NET 10平台,采用模块化设计
- 核心功能:
- 强类型数据包工具
- 确定性游戏循环处理
- 实用的测试覆盖率
- 原生支持AOT编译
- Lua脚本引擎
项目状态
- 开发中:当前版本0.17.0
- 已实现:
- TCP服务器连接生命周期管理
- 数据包解析框架
- 基于属性的数据包映射
- 消息总线系统
- 文件持久化模块
- 交互式控制台UI
- 区域系统(基于ModernUO)
- 基础路径寻找服务
- 简易邮件系统
技术亮点
- 源码生成器:减少运行时反射,提升AOT兼容性
- 事件与数据包分离:清晰的网络/游戏逻辑边界
- 游戏循环调度:基于时间戳而非固定tick
- 空间分块策略:采用16x16区块的懒加载世界流
- 世界生成管道:支持按需生成游戏内容
快速开始
- 准备环境:.NET SDK 10.0.x
- 设置目录:
shell export MOONGATE_ROOT_DIRECTORY="$HOME/moongate" export MOONGATE_UO_DIRECTORY="/path/to/uo-client" - 启动服务器:
shell dotnet run --project src/Moongate.Server
贡献与许可
- 开源协议:GPL-3.0
- 协作邀请:项目正在积极寻求贡献者,特别是技术/代码审查方面的帮助
相关链接
- 项目文档:https://moongate-community.github.io/moongatev2/
- 开发背景:https://orivega.io/moongate-v2-rewriting-a-ultima-online-server-from-scratch-because-i-wanted-to/
(注:保留了核心技术细节和项目关键信息,移除了GitHub界面元素、重复内容和不相关的导航菜单等)
评论总结
评论总结:
- 对项目logo和名称的喜爱
- "I love your logo." (评论1)
- "Cool name for a project like this along with the art!" (评论3)
- 对经典游戏的怀念
- "Ahhh this takes me back to playing on various private UO and DAoC servers." (评论3)
- "I used to love playing around with RunUO back ~2003" (评论4)
- 对技术实现的讨论
- "I've long been irritated by the use of the term 'server emulator'" (评论5)
- "Really like the strict network/domain separation + Lua-at-the-edges approach here" (评论10)
- 对项目技术架构的肯定
- "starting fresh with a cleaner separation between networking and game logic makes a lot of sense" (评论12)
- "Keeping a stable C# core and pushing gameplay iteration into scripts seems like the right tradeoff" (评论10)
- 对开发者个人贡献的赞赏
- "am I reading the contribution graph correctly, you've done all this yourself?" (评论9)
- "Kudos to you. You've gotta explain how you've managed to do so much all by yourself." (评论9)
- 对游戏社区生态的讨论
- "UO was the only game that I've ever played where you had 'commoner' players" (评论7)
- "It's very different from modern games" (评论7)
- 技术细节询问
- "how do you avoid packet bursts when a player enters a busy area" (评论12)
- "Curious if you've seen any hotspots at the C#↔Lua boundary under load" (评论10)
- 对.NET平台的肯定
- "I like seeing how more projects use .NET, which is a great platform." (评论8)
- 对项目未来的期待
- "I look forward to exploring this once you've gotten it a bit further" (评论2)
- "Hope others can contribute and build this up even more" (评论14)