OnlineCardGame
Real‑time peer‑to‑peer card battles in your phone and on desktop.
Project Goals & Description
Build a lightweight, cross‑platform card game that:
- Delivers <50 ms end‑to‑end latency in casual matches
- Requires zero server state beyond lobby orchestration
- Allows to play a fun game with good balance
Feature Roadmap
Feature | Status |
---|---|
Join / host lobby | - [x] Implemented |
Gameplay | - [x] Implemented |
UI | - [ ] Planned |
Mobile Version | - [ ] Planned |
Usage
The MVP v2 is distributed as a self-contained Windows build produced by the CI pipeline.
- Open the Actions → CI+CD workflow in GitHub and select the latest green run.
- Download the artifact
CardGame-windows
. - Extract the ZIP archive to any local directory (no installation required).
- Double-click
CardGame.exe
.
The game will start and automatically connect to the public signalling server
Advanced: To build from source you need Go 1.24+, Godot 4.4, and the Godot export templates.
Rungo run ./server/cmd
to launch the signalling server andgodot --export-release "Windows Desktop"
from the CardGame folder to rebuild the client. —
Installation / Deployment
To build from source you need Go 1.24+, Godot 4.4, and the Godot export templates installed.
Clone the repo, run go run ./server/cmd
to start the signalling server, then from the CardGame
folder execute
godot --export-release "Windows Desktop"
to produce CardGame.exe
. Drop the binary onto any Windows 10+ machine and connect it to the same LAN or make the server publicly reachable on ports 80/443 (TCP) and 3478 (UDP).
I’m not copying and pasting without reading
Documentation
-
Quality Assurance
-
Automation
Quality Assurance
Layer | Tooling | Test Types |
---|---|---|
Go server | go test | Unit & integration |
Godot client | GUT, gdlint , gdformat | Unit & integration |
CI pipeline | GitHub Actions | Lint, test, package |
Build & Deployment Automation
Stage | Tool / File | Purpose |
---|---|---|
CI | .github/workflows/main.yml | Lint, test, package |
CD | GitHub Actions artefacts | Publish CardGame-windows.zip |
Each successful run attaches a fresh Windows artefact which can be downloaded from the Actions → CI+CD tab.
Architecture Overview
Static View
Component | Responsibility | Tech |
---|---|---|
Signalling Server | Lobby management, matchmaking, SDP/ICE relay | Go 1.24, WebSocket |
CardGame Client | Game logic, rendering, WebRTC data‑channel | Godot 4.4 |
WebRTC DataChannel | Real‑time state sync | Built‑in WebRTC |
Dynamic View
Average time from lobby click to open data channel: 3.0 s (measured via OS.get_ticks_msec()
on both peers).
Deployment View
Node | Artefact | Notes |
---|---|---|
Player PC | CardGame.exe | Self‑contained |
Public VPS | signalling-server binary / Docker | Ports 80/443 TCP, 3478 UDP |
Tech Stack
See docs/architecture/architecture.md for full details.