Fantasy  by qq362946

High-performance C# framework for distributed game servers and business apps

Created 2 years ago
1,259 stars

Top 31.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary Fantasy is a high-performance, distributed C# game server framework designed for large-scale MMORPGs, extendable to non-game business applications. It targets game developers seeking robust, scalable backend solutions. The framework significantly lowers development complexity through AI-powered assistance and offers extreme performance via a zero-reflection, Native AOT-compatible architecture, enabling rapid development of complex online experiences.

How It Works Fantasy employs a zero-reflection architecture, utilizing source generators for compile-time code registration, which maximizes performance and ensures compatibility with Native AOT compilation. Its core design incorporates an Entity Component System (ECS) for flexible and efficient object management. A key feature is the Roaming routing system, which provides a transparent distributed architecture, automatically directing messages between servers without manual configuration. The framework also integrates AI agents via a dedicated fantasy-net Skill, simplifying learning, code generation, and project validation.

Quick Start & Requirements The primary installation method involves the Fantasy.Cli tool: dotnet tool install -g Fantasy.Cli. Projects are initialized using fantasy init. Prerequisites include .NET SDK 8.0+ and an IDE like VS 2022 or Rider. Unity 2022.3.62+ is recommended for client development, and MongoDB 4.0+ is optional for data persistence. Official documentation and quick-start guides are available at Docs/README.md.

Highlighted Details

  • AI-powered development assistance (fantasy-net Skill) for learning, code generation, and project validation.
  • Zero-reflection architecture with source generators for compile-time registration, enabling extreme performance and Native AOT compatibility.
  • Multi-protocol support (TCP, KCP, WebSocket, HTTP) allowing a single codebase to target various platforms and use cases.
  • Roaming system for transparent distributed architecture, automatically routing messages across servers without explicit configuration.
  • Entity Component System (ECS) design for flexible and efficient game object management.

Maintenance & Community Community support is primarily channeled through QQ Group: 569888673. For technical issues, GitHub Issues can be used. Contact is also available via email at 362946@qq.com. The official website is www.code-fantasy.com.

Licensing & Compatibility The project is released under the MIT License, which is highly permissive for commercial use and integration into closed-source projects.

Limitations & Caveats Currently, Fantasy does not support Godot, WinForms/WPF, or Console applications. Development focus remains on game servers and Unity clients.

Health Check
Last Commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
14
Star History
37 stars in the last 30 days

Explore Similar Projects

Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
8 more.

langgraph by langchain-ai

2.3%
31k
Agent orchestration framework for building controllable agents
Created 2 years ago
Updated 9 hours ago
Feedback? Help us improve.