home-lang/ballerburg
publicClone
Push over the same URL. A password will not work: create a token under access tokens and use it in place of one.
- src
- ui
- .gitignore 299 B
- bun.lock 3.0 KB
- package.json 783 B
- README.md 3.8 KB
- TODO.md 24.6 KB
- tsconfig.json 526 B
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 devAbout
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.mdTechnology
- 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