-
Notifications
You must be signed in to change notification settings - Fork 5
Development Setup
Andrey Klyuev edited this page Aug 13, 2025
·
1 revision
This guide covers setting up the development environment for SphereEmu.
- .NET SDK 8.0 or later: For C# compilation and runtime
- Godot Engine 4.x: For game engine functionality and scene management
- Visual Studio 2022 or JetBrains Rider: Recommended IDEs with C# support
- Git: For version control
- LiteDB Studio: For database inspection and management
- Wireshark: For network packet analysis
git clone <repository-url>
cd SphereEmudotnet restore SphServer.sln- Open
SphServer.sln - Set startup project to main server project
- Configure debugging settings:
- Working Directory: Project root
- Command Arguments: (none needed)
- Environment Variables:
ASPNETCORE_ENVIRONMENT=Development
- Open
SphServer.sln - Configure Run Configuration:
- Project: SphServer
- Working Directory:
$ProjectFileDir$ - Environment: Development
- Open
project.godotin Godot Engine - Ensure C# support is enabled
- Build project in Godot (Project → Tools → C# → Create C# Solution)
# Debug build
dotnet build SphServer.sln
# Release build
dotnet build SphServer.sln -c Release- Visual Studio: Build → Build Solution (Ctrl+Shift+B)
- Rider: Build → Build Solution (Ctrl+F9)
- Open project in Godot
- Press F5 or click Play button
- Main scene:
res://Godot/Scenes/MainServer.tscn
- Follow existing namespace conventions
- Place new server code in
/Server - Place new client code in
/Client - Place shared code in
/Shared - Use appropriate subdirectories for organization
- Use C# naming conventions (PascalCase for public, camelCase for private)
- Add XML documentation for public methods
- Follow existing patterns for database access
- Use the logging system for debug output
- Set breakpoints in IDE
- Start debugging (F5)
- Connect client to trigger breakpoints
- Enable
DebugModein configuration - Check console output for connection states
- Review log files for detailed packet information
- Use LiteDB Studio to inspect database contents
- Check database connection string in logs
- Verify file permissions on database directory
- Use Wireshark to capture packets on localhost
- Check server logs for connection attempts
- Verify firewall settings allow connections on configured port
-
Missing references: Run
dotnet restore - Godot integration issues: Rebuild in Godot editor
- Version conflicts: Check .NET SDK version
- Port binding failures: Change port in configuration
- Database access errors: Check file permissions
- Missing dependencies: Verify NuGet packages restored
- High memory usage: Check for connection leaks
- Slow startup: Verify database and file access
- Network timeouts: Check firewall and network settings
- Create feature branch from main
- Implement changes with appropriate tests
- Update documentation if needed
- Submit pull request with clear description
- Address review feedback
type(scope): description
Examples:
feat(server): add new authentication method
fix(client): resolve state transition bug
docs(wiki): update configuration guide
-
feature/description: New features -
fix/description: Bug fixes -
docs/description: Documentation updates -
refactor/description: Code refactoring
This setup provides a complete development environment for working on SphereEmu, with proper debugging capabilities and development workflows.
-
Server
- SphereServer
- Connection Handling
- Authentication
- Configuration
-
Client
- SphereClient
- Client States
- Networking
-
Shared
- Database
- Logging
- Game Data
- BitStream
- Development Setup
- Code Standards
- Testing Guidelines
- Debugging Guide
- Configuration Options
- API Documentation
- Database Schema
- Packet Definitions