run-client

FWFsoft's avatarfrom FWFsoft

Start a single Gambit game client that connects to 127.0.0.1:1234. Use when the user wants to run a client, test client functionality, or manually connect to a server.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 4, 2026

When & Why to Use This Skill

The run-client skill provides a streamlined way to launch a Gambit game client and establish a connection to a local server at 127.0.0.1:1234. It automates the build process and initializes an SDL2-based graphical interface, making it an essential tool for developers testing network protocols, player movement, and real-time game mechanics.

Use Cases

  • Local Connectivity Testing: Quickly verify the connection between the game client and the local server using the ENet UDP-based protocol.
  • Feature Validation: Manually test game features such as SDL2 window rendering and player movement controls (WASD/Arrow keys).
  • Debugging and Logging: Monitor real-time console output for logger initialization and connection status to troubleshoot client-side issues.
  • Multiplayer Simulation: Launch individual client instances to test manual server connections and player interactions in a development environment.
namerun-client
descriptionStart a single Gambit game client that connects to 127.0.0.1:1234. Use when the user wants to run a client, test client functionality, or manually connect to a server.

Run Gambit Client

Starts a single Gambit game client that connects to the server at 127.0.0.1:1234.

Instructions

  1. Ensure the server is running first (use run-server skill or dev skill)

  2. Run the client command:

    make run-client
    

Client Details

  • Server Address: 127.0.0.1:1234
  • Graphics: SDL2 window (800×600)
  • Protocol: ENet (UDP-based)
  • Input: WASD or arrow keys for movement

Expected Behavior

When running, you should see:

[HH:MM:SS] [info] Logger initialized
[HH:MM:SS] [info] Connected to 127.0.0.1:1234
[HH:MM:SS] [info] Local player color: r,g,b

An 800×600 window will open showing the game.

Stopping the Client

  • Close the window or press Ctrl+C
  • The client will disconnect gracefully

Notes

  • The client runs in the foreground
  • For testing multiplayer, use the dev skill to run 1 server + 4 clients automatically
  • The client will automatically build if needed
  • Ensure the server is running before starting the client