BreakWall is a classic brick-breaking game built with SDL2, featuring multiple levels, sound effects, and music inspired by the Commodore Amiga era. This document provides prerequisites, compilation instructions, packaging details, and element descriptions for the game.
To develop and run BreakWall, you need the following dependencies:
- SDL2 (version 2.0.14)
https://www.libsdl.org/download-2.0.php - SDL2_mixer (version 2.0.4)
https://www.libsdl.org/projects/SDL_mixer/ - SDL2_image (version 2.0.5)
https://www.libsdl.org/projects/SDL_image/
For assistance with compiling these SDL versions, refer to the script at:
https://github.com/Gerald1973/git_fetch_last_release
- Linux:
g++
(GCC compiler)make
debhelper
(>= 12) for packaging
- Windows:
- MinGW-w64 (for GCC on Windows)
- MSYS2 (optional, for a Unix-like environment)
- CMake (optional, for build configuration)
-
Install Dependencies:
sudo apt update sudo apt install -y g++ make libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev
-
Clone the Repository:
git clone https://github.com/Gerald1973/BreakWall.git cd BreakWall
-
Compile the Game:
make
-
Run the Game:
./breakwall
-
Install MinGW-w64:
- Download and install MinGW-w64 from https://www.mingw-w64.org/.
- Ensure
g++
,mingw32-make
, and necessary libraries are in your PATH. - Note: MinGW-w64 provides
mingw32-make.exe
instead ofmake.exe
in itsbin
folder. Usemingw32-make
instead ofmake
, or create an alias (e.g.,alias make=mingw32-make
in your shell configuration) to usemake
commands seamlessly.
-
Install SDL2 Libraries:
- Download SDL2, SDL2_mixer, and SDL2_image development libraries for MinGW from the links above.
- Extract the libraries to a directory, e.g.,
C:\SDL2
,C:\SDL2_mixer
,C:\SDL2_image
. - Ensure the
include
andlib
directories are accessible to the compiler.
-
Clone the Repository:
- Use Git for Windows or clone via:
git clone https://github.com/Gerald1973/BreakWall.git cd BreakWall
- Use Git for Windows or clone via:
-
Compile the Game:
- Open a MinGW terminal or MSYS2 shell.
- Update the Makefile if necessary to point to your SDL2 library paths:
INCLUDES = -I"C:/SDL2/include" -I"C:/SDL2_mixer/include" -I"C:/SDL2_image/include" LIBS = -L"C:/SDL2/lib" -L"C:/SDL2_mixer/lib" -L"C:/SDL2_image/lib" -lmingw32 -lSDL2main -lSDL2 -lSDL2_mixer -lSDL2_image
- Run:
Alternatively, if you’ve set up the alias, use:
mingw32-make
make
-
Run the Game:
- Copy required DLLs (e.g.,
SDL2.dll
,SDL2_mixer.dll
,SDL2_image.dll
) from the SDL2 librarybin
directories to the same directory as thebreakwall.exe
. - Run:
./breakwall.exe
- Copy required DLLs (e.g.,
-
Install Packaging Tools:
sudo apt install -y debhelper devscripts build-essential
-
Build the Debian Package:
- Ensure you are in the project root directory (
BreakWall
). - Run:
dpkg-buildpackage -us -uc
- This generates
.deb
files in the parent directory, includingbreakwall_1.0_amd64.deb
.
- Ensure you are in the project root directory (
-
Install the Package:
sudo dpkg -i ../breakwall_1.0_amd64.deb sudo apt-get install -f # Resolve dependencies if needed
-
Run the Installed Game:
breakwall
-
Create a Distribution Folder:
- Create a folder, e.g.,
BreakWall_Release
. - Copy the compiled
breakwall.exe
to this folder.
- Create a folder, e.g.,
-
Include Dependencies:
- Copy the required DLLs (
SDL2.dll
,SDL2_mixer.dll
,SDL2_image.dll
, and others listed inwindows/dll/
) to the same folder asbreakwall.exe
. - Copy the
resources/
directory (containingimages/
,mods/
, andsound/
) to the release folder.
- Copy the required DLLs (
-
Test the Package:
- Run
breakwall.exe
from the release folder to ensure all dependencies are included.
- Run
-
Optional: Create a ZIP Archive:
zip -r BreakWall_Release.zip BreakWall_Release/
The screen resolution is 50% of a Full HD display:
- Height: 540 pixels
- Width: 960 pixels
The standard brick size is based on the texture dimensions:
- Width: 64 pixels
- Height: 32 pixels
The wall is composed of bricks:
- Maximum Width: 15 bricks
- Maximum Height: 20 bricks
Used for score display:
- Width: 48 pixels
- Height: 64 pixels
Music files are sourced from the Commodore Amiga era and played using SDL2_mixer.
- Preferred Format: PNG (supports transparent colors).
- Preferred Format: WAV (chosen for compatibility and quality).
- Ensure all resource files (images, sounds, and music) are present in the
resources/
directory as specified in the project structure. - For licensing concerns, particularly regarding music files, refer to the
debian/copyright
file. Replace unlicensed music with royalty-free alternatives if needed. - The game is distributed under the MIT License, as specified in the
debian/copyright
file.
For further details, refer to the project repository:
https://github.com/Gerald1973/BreakWall