Skip to content

denisgcm/kapman-augmentcode

Repository files navigation

Kapman - Kubernetes-themed Pac-Man Clone

🎮 A modern take on the classic arcade game Pac-Man, featuring Kubernetes-themed graphics and cloud-native technology stack.

Features

  • Kapman: Play as a solid blue 'K' navigating through the maze
  • Cloud Ghosts: Animated cloud enemies with different AI behaviors
  • Kubernetes Pods: Collect yellow pod icons scattered throughout the maze
  • Super Pods: Blue glowing power-ups that make ghosts vulnerable
  • High Scores: Persistent score tracking with BoltDB
  • Responsive Design: Modern web interface with Kubernetes-themed styling

Technology Stack

Backend

  • Go: High-performance server with Chi router
  • BoltDB: Embedded database for high score persistence
  • Embedded Assets: Frontend served from Go binary using embed package

Frontend

  • HTML5 Canvas: Smooth 60fps game rendering
  • CSS/SCSS: Kubernetes-themed styling with glow effects
  • JavaScript: Game engine with collision detection and AI

Game Mechanics

  • Lives: Start with 3 lives
  • Scoring:
    • Pod: 10 points
    • Super Pod: 50 points
    • Ghost: 200, 400, 800, 1600 points (multiplier resets each super pod)
  • Win Condition: Collect all pods in the maze
  • Lose Condition: All lives lost to ghost collisions

Controls

  • Arrow Keys or WASD: Move Kapman
  • P: Pause/Resume game
  • R: Restart current level

Ghost AI

  • Blinky (Red): Direct chase behavior
  • Pinky (Pink): Targets 4 cells ahead of Kapman
  • Inky (Cyan): Complex targeting using Blinky's position
  • Clyde (Orange): Chase when far, scatter when close

Build & Run

Prerequisites

  • Go 1.21 or later
  • TypeScript compiler (npm install -g typescript)
  • Modern web browser

Quick Start

Using Makefile (Recommended)

# Build everything (TypeScript + Go)
make build

# Build and run
make run

# Development mode
make dev

# Clean build artifacts
make clean

# Show all available commands
make help

Using Build Script (Windows)

# Build everything
build.bat

# Run the server
kapman.exe

Manual Build

# Compile TypeScript
tsc web/main.ts --target es2017 --outFile web/main.js

# Build Go binary
go build -o kapman.exe ./cmd/kapman

# Run the server
./kapman.exe

The game will be available at http://localhost:8080

Development

# Quick build (Go only)
make quick

# Build for production
make build-prod

# Run tests
make test

# Format code
make fmt

Project Structure

kapman/
├── cmd/
│   └── kapman/              # Go server entrypoint
│       └── main.go
├── web/                     # Frontend assets (embedded)
│   ├── index.html          # Game HTML structure
│   ├── style.css           # Compiled CSS styles
│   ├── style.scss          # SCSS source
│   ├── main.js             # Game JavaScript engine
│   └── main.ts             # TypeScript source
├── go.mod                  # Go module definition
├── go.sum                  # Go module checksums
├── package.json            # Project metadata
└── README.md               # This file

API Endpoints

  • GET /: Serve the game interface
  • GET /api/scores?limit=N: Get top N high scores
  • POST /api/scores: Submit a new score

High Score Format

{
  "name": "Player Name",
  "score": 12345,
  "level": 3,
  "timestamp": "2025-06-16T21:30:00Z"
}

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Acknowledgments

  • Original Pac-Man game by Namco
  • Kubernetes project for inspiration
  • Go community for excellent tooling
  • Modern web standards for smooth gameplay

© 2025 Kapman Project. Built with ❤️ and ☸️ (Kubernetes).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published