A .NET 6.0 game server implementation with WebSocket support and various game-related functionalities.
This project is a game server built with .NET 6.0 that provides backend services for a city/simulation game. It includes features for handling game logic, WebSocket communication, data persistence, and AI/LLM integration.
- .NET 6.0 SDK
- MySQL Server
- Redis Server
- Python (for pythonnet integration)
The server uses several key packages:
- Microsoft.Extensions.Hosting (7.0.0)
- Microsoft.Extensions.Hosting.Systemd (7.0.0)
- MySql.Data (8.3.0)
- Newtonsoft.Json (13.0.3)
- pythonnet (3.0.3)
- StackExchange.Redis (2.7.33)
- YamlDotNet (15.1.2)
/src/CityCommon/
- Core game logic and common functionality/Archvie/
- Archive management/Data/
- Data models and configuration/Msg/
- Message handling and protocols/NavCity/
- Navigation and pathfinding/Server/
- Server implementation
- WebSocket-based real-time communication
- City simulation and game state management
- Pathfinding and navigation systems
- User data persistence
- Message handling system
- LLM/AI integration
- Configuration management
To build the project:
dotnet build
To run the project:
dotnet run
For development with hot reload:
dotnet watch run
The server uses the following configuration files:
appsettings.json
- Main configuration fileappsettings.Development.json
- Development environment settings
Key configuration settings include:
- Database connection strings
- Redis configuration
- WebSocket endpoints
- Logging settings
The project includes VS Code configuration files for debugging and tasks. To get started:
- Install the C# extension for VS Code
- Open the project in VS Code
- Use the included launch configurations for debugging
Launch configurations are available in .vscode/launch.json
for:
- Debug with hot reload
- Attach to process
- Launch without debugging
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support, please open an issue in the GitHub repository.