Skip to content

home-lang/ballerburg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ballerburg

Classic Castle Combat Game - A faithful recreation of the legendary 1987 Atari ST game.

Built with Home programming language and Craft UI engine.

Quick Start

# Install dependencies
bun install

# Run the game
bun start

# Development mode (with hot reload)
bun dev

About

Ballerburg is a turn-based artillery game where two players control rival castles. Players take turns firing cannons at each other while managing their kingdom's economy, population, and defenses.

Features

  • Physics-based projectile simulation with wind effects
  • 7 AI strategies with varying difficulty (Oaf, Yokel, Boor, Doofus, Fumbler, Geezer, Ruffian)
  • Economic system with taxes, income, and market purchases
  • Procedurally generated terrain with midpoint displacement
  • Sound effects using Web Audio API
  • Save/Load system with auto-save support
  • Modern UI built with Craft's WebView engine

Controls

  • Click a cannon to aim and fire
  • Market button to buy supplies, cannons, towers
  • King button for royal advice
  • Done button to end your turn
  • Escape to pause/menu

Game Mechanics

Win Conditions

  • Destroy the enemy king (instant victory)
  • Deplete enemy population to 0
  • Have more gold/population when turns run out

Resources

  • Gold - Used to purchase items, gained from taxes and shaft towers
  • Gunpowder - Required for firing cannons (more powder = more power)
  • Cannonballs - Ammunition for cannons
  • Population - Provides tax income, affected by tax rate

Market Items

  • Housing - Increases population capacity
  • Shaft Tower - Passive gold income each turn
  • Cannon - Additional firing positions
  • Weather Vane - Shows exact wind direction
  • Gunpowder - 30 units of powder
  • Cannonball - Single ammunition

Project Structure

ballerburg/
├── src/
│   ├── data/types.home       # Core type definitions
│   ├── game/
│   │   ├── cannon.home       # Cannon system
│   │   ├── castle.home       # Castle structures
│   │   ├── economy.home      # Economic system
│   │   ├── persistence.home  # Save/load system
│   │   ├── player.home       # Player state
│   │   └── state.home        # Game state manager
│   ├── physics/
│   │   ├── collision.home    # Hit detection
│   │   ├── projectile.home   # Projectile physics
│   │   └── terrain.home      # Terrain generation
│   ├── ai/strategy.home      # AI strategies
│   ├── ui/
│   │   ├── messages.home     # Game text/messages
│   │   └── sound.home        # Sound event system
│   └── main.home             # Entry point
├── ui/
│   ├── scripts/
│   │   ├── game.js           # Game controller
│   │   ├── persistence.js    # Browser persistence
│   │   ├── renderer.js       # Canvas rendering
│   │   └── sound.js          # Web Audio sounds
│   ├── styles/main.css       # Styling
│   └── index.ts              # Craft app entry
├── package.json
└── README.md

Technology

  • Home Language - Modern programming language with Rust/TypeScript-inspired syntax
  • Craft UI Engine - WebView-based native UI framework
  • Bun - Fast JavaScript runtime and bundler
  • Web Audio API - Synthesized sound effects
  • Canvas 2D - Game rendering

Original Game

Ballerburg was originally created by Eckhard Kruse in 1987 for the Atari ST. This recreation aims to preserve the classic gameplay while modernizing the technology stack.

License

MIT License - See LICENSE file for details.

Credits

  • Original game by Eckhard Kruse (1987)
  • Recreation built with Home + Craft

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors