Skip to content

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BevyBomber 💣

A pixel-art Bomberman game built with Rust and Bevy engine, featuring singleplayer, multiplayer, and battle royale modes.

Rust Bevy License

Features

  • Singleplayer — Score-based (first to 1000 pts), 1 human + 3 AI bots, round resets
  • Multiplayer — 128Hz server-authoritative frame sync via UDP, up to 8 players
  • Battle Royale — 201x201 map, shrinking zone, AOI interest management, up to 1000 players
  • 11 Powerups — BombUp, FireUp, SpeedUp, Shield, Ghost, RemoteBomb, MegaBomb, BlastPierce, BigPlayer, SpeedBoost, ExtraLife
  • Knife Attack — Backstab enemies from behind (K key)
  • Pixel Art — Procedurally generated sprites with front/back/side views
  • 8-bit SFX — Programmatically generated WAV sound effects
  • Radar Minimap — Real-time player positions in top-left corner

Architecture

bevymagic/
├── crates/
│   ├── shared/      # ECS components, map gen, bomb logic, protocol
│   ├── client/      # Bevy rendering, input, UI, audio
│   ├── server/      # Headless authoritative simulation
│   └── asset_gen/   # Procedural sprite & audio generation
└── assets/
    ├── sprites/     # Generated pixel art (tileset, players, bombs, etc.)
    └── audio/       # Generated 8-bit WAV files

Networking: lightyear 0.19 with pure server authority — no client-side prediction. Server runs AABB collision at 128Hz, clients render server-authoritative positions.

Quick Start

Prerequisites

  • Rust (edition 2021)
  • macOS / Linux / Windows

Build & Run

# Generate pixel art assets
cargo run --bin asset_gen

# Singleplayer (press 1)
cargo run --bin client

# Multiplayer
cargo run --bin server              # Terminal 1
cargo run --bin client              # Terminal 2, press 2
cargo run --bin client              # Terminal 3, press 2

# Battle Royale
GAME_MODE=br cargo run --bin server # Terminal 1
cargo run --bin client              # Terminal 2, press 3

Note (macOS): If you encounter C compiler issues (Bun hijacking /opt/bin/cc), use the included ./cargo.sh wrapper instead of cargo.

Controls

Key Action
WASD Move
Space Place Bomb
K Knife (backstab from behind)
E/R Detonate Remote Bombs
Tab Scoreboard
ESC Pause / Quit

Scoring (Singleplayer)

Action Points
Destroy Brick +10
Pickup Powerup +50
Kill Player +200
Survive Round +300
Win First to 1000

Tech Stack

Component Choice Why
Engine Bevy 0.15 Rust-native ECS, parallel systems
Networking lightyear 0.19 Server-authoritative, UDP netcode
Tick Rate 128 Hz Precise collision detection
Replication 8ms interval Low-latency state sync
Collision AABB (0.5px margin) Pixel-perfect wall detection
Map Sync Deterministic seed Server & client generate identical maps

License

MIT

About

bombergame demo

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages