run-server
Start the Gambit game server on 0.0.0.0:1234. Use when the user wants to run just the server, test server functionality, or manually test with clients.
When & Why to Use This Skill
The run-server skill automates the deployment of the Gambit game server, a high-performance UDP-based environment using the ENet protocol. It streamlines the process of initializing the server on port 1234, providing developers with immediate feedback through integrated spdlog logging. This skill is specifically designed to facilitate rapid backend testing, connection monitoring, and manual client-server integration checks within a local or development environment.
Use Cases
- Server Stability Validation: Quickly launch the Gambit server to verify that the environment is correctly configured and the service initializes without errors.
- Manual Integration Testing: Provide a stable host for game clients to connect to, allowing developers to manually test gameplay mechanics and network synchronization.
- Real-time Event Monitoring: Utilize the foreground logging feature to track player connections, disconnections, and server-side events for immediate debugging.
- Network Protocol Debugging: Test ENet UDP connectivity and port availability to ensure the game's networking layer is robust against connection issues.
| name | run-server |
|---|---|
| description | Start the Gambit game server on 0.0.0.0:1234. Use when the user wants to run just the server, test server functionality, or manually test with clients. |
Run Gambit Server
Starts the Gambit game server, which listens for client connections on port 1234.
Instructions
- Run the server command:
make run-server
Server Details
- Listen Address: 0.0.0.0:1234
- Protocol: ENet (UDP-based)
- Logging: Server logs all connections and events via spdlog
Expected Behavior
When running, you should see:
[HH:MM:SS] [info] Logger initialized
[HH:MM:SS] [info] Server initialized and listening on port 1234
When clients connect:
[HH:MM:SS] [info] Player <id> joined (color: r,g,b)
Stopping the Server
- Press
Ctrl+Cto gracefully shut down the server - The server will close all client connections and clean up
Notes
- The server runs in the foreground - use
Ctrl+Cto stop it - For testing multiple clients, use the
devskill instead - Ensure port 1234 is not already in use
- The server will automatically build if needed