basic

command
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2025 License: LGPL-3.0 Imports: 3 Imported by: 0

README

Basic Game Example

This is a port of the starter game template to cardinal V2.

Prerequisites

  • Go 1.24 or later
  • NATS server with JetStream enabled
  • Docker and Kubernetes (for running with Tilt)

Running the Game

Start the development environment using Tilt:

tilt up

Run the game server:

go run main.go

Testing the Game

The example includes a test client that can send various game commands. The client automatically creates necessary JetStream streams and uses the correct message format.

Available Commands

Create a new player:

go run cmd/client/main.go create-player <nickname>

# Example:
go run cmd/client/main.go create-player player1

Attack a player:

go run cmd/client/main.go attack-player <target> <damage>

# Example:
go run cmd/client/main.go attack-player player1 20

View game state (debug log):

go run cmd/client/main.go debug-log

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL