A classic Bomberman-style arena game built in the Zig programming language. This project is a demonstration of creating a lightweight, performant, and entirely self-contained game using modern, low-level programming.
This project is a single-pc-multiplayer "last-man-standing" game where players navigate a grid, place bombs, and use power-ups to defeat their opponents. The game is built with a focus on performance and simplicity, leveraging the power of Zig for a minimal footprint and direct control over system resources.
- Local Multiplayer: Supports 2 to 4 players on a single machine.
- Dynamic Arena: The game map is procedurally generated with destructible barrels.
- Power-ups: Destroy barrels to uncover upgrades for your character.
- Rebindable Controls: A settings menu allows players to customize their keybindings and team colors.
- Highly Optimized: The game is lightweight with low resource consumption.
One of the primary goals of this project was to create a game with a small footprint, showcasing the efficiency of Zig and careful resource management.
- Executable Size: The entire game is contained in a standalone executable file with size under 1 MB.
- Resource Consumption:
- CPU: < 2% on an AMD Ryzen 5 3600 6-Core processor.
- GPU: < 2% on an NVIDIA GeForce GTX 1660 Ti.
- RAM: < 50 MB.
- Memory Management: The project features no dynamic memory allocations (on the Zig side) and avoids global mutable variables, contributing to its stability and predictable performance.
- Technology Stack:
The goal is simple: be the last Bomberman standing. Eliminate your opponents by strategically placing bombs and using the environment to your advantage.
- Placing Bombs: Press your assigned key to drop a dynamite bomb. The bomb will explode after a few seconds.
- Explosions: Explosions travel in a cross pattern (up, down, left, right) from the bomb's location.
- Destruction: Explosions will destroy any barrels in their path and eliminate any player they touch.
- Winning: The last player alive at the end of the round wins.
Destroying barrels may reveal a random power-up. Walk over an item to collect it and gain an advantage!
| Icon | Power-up | Description |
|---|---|---|
| ❤️ | Heal | Restores one point of health. |
| 💣 | Extra Dynamite | Increases the number of bombs you can place at one time. |
| 🔥 | Radius Upgrade | Increases the explosion radius of your bombs by one tile. |
| 💨 | Speed Up | Increases your character's movement speed. |
| 🌀 | Teleport Upgrade | Unlocks the ability to teleport. |
The game supports up to four players with default keyboard layouts. All keys are rebindable in the Settings menu.
| Player | Up | Down | Left | Right | Place Dynamite |
|---|---|---|---|---|---|
| Player 1 | W |
S |
A |
D |
Space |
| Player 2 | Up |
Down |
Left |
Right |
Enter |
| Player 3 | T |
G |
F |
H |
Y |
| Player 4 | I |
K |
J |
L |
O |
- Teleport: Quickly double-tap a movement key to instantly teleport two grid spaces in that direction. This is a great way to escape danger or surprise an opponent. The teleport ability starts with a cooldown of 5 seconds. Each "Teleport Upgrade" power-up collected reduces this cooldown by 0.5 seconds, down to a minimum of 2 seconds.
