Skip to content

xDUDSSx/bomberman

Repository files navigation

Bomberman game

A clone game written in C++ and SDL2

License: MIT

The game is a basic implementation of a bomberman arena where players or computers play against each other. The goal of the game is to eliminate other players or computers. The game has a detailed czech description in the zadani.txt file. The code and docs are all in english.

Originally written as semestral work for the BI-PA2 class at Czech Technical University in Prague.

Building on Linux

On linux you can build the game using the provided Makefile. You need to have SDL2 libraries installed, specifically:

  • SDL2 (the core library)
  • SDL2_image
  • SDL2_ttf

Then you can build the binary using

make
make compile

Other make commands are available

make run 	#runs the game
make doc 	#generates the docs in the doc directory
make clean	#removes all generated files

Building on Windows

There is no build system for windows aside from just using the source code and compiling everything manually.

A precompiled game Bomberman.exe binary is however ready to run in the windowsBuild directory together with the required libraries and resources.

Starting the game

The game doesn't have proper gui menus and its map and settings are set using a config file. It can be started in the default mode for 2 players just by starting the binary. Other maps can be set by passing a config file path as an argument to the binary.

Linux:

./bomberman config.cfg

Windows:

Bomberman.exe config.cfg

Game controls

Players:

Player A
WSAD and Space to place a bomb
Player B
Arrows and Enter to place a bomb

Other controls:

ESC
Exit game
F1
Enables bounding boxes
F2
Shows AI pathfinding paths and tiles the AI considers dangerous
F3
Enables debug logging in the console
F4
Slow motion