A terminal-based multiplayer strategy game inspired by Clash Royale, implemented in Go. Players connect to a server, log in, and battle each other using troops and towers, with real-time updates and colorful terminal UI.
- Multiplayer server-client architecture over TCP
- User authentication and persistent metadata
- Real-time match updates and notifications
- Troop and tower management with leveling and EXP
- Colorful, interactive terminal UI
assets/ # Game data: users, standard troops/towers, player metadata
cmd/
client/ # Client application entrypoint
server/ # Server application entrypoint
internal/
config/ # Game and protocol constants
data/ # User and metadata management
game/ # Core game logic (engine, player, troop, tower, etc.)
logic/ # Matchmaking logic
network/ # TCP networking and protocol
ui/ # Terminal UI rendering and color utilities
pkg/
utils/ # Utility functions (e.g., rune width for UI)
- Go 1.24+
- Terminal that supports ANSI escape codes
go mod tidygo run ./cmd/serverOpen a new terminal for each player:
go run ./cmd/clientSee assets/users.json:
- Username:
player1, Password:1 - Username:
player2, Password:2
- Log in with your username and password.
- Wait for matchmaking.
- Use commands to attack:
Example:
<troop_index> <tower_index>0 2(use troop 0 to attack tower 2) - Watch for notifications and match updates in real time.
- Add new users in
assets/users.json. - Edit troop/tower stats in
assets/standard.json. - Player progress is saved in
assets/metadata/<username>/metadata.json.