A Game I made back in 2012 or 2013, for a competition in C++
UPDATE 02/04/2024: The game is buildable again! I upgraded it to use SDL 2 and i've provided executables for Windows, Linux, Max and for the web.
This game was made for the Moosader Forum Competition 8: Procedural/Random Generated Game.
The game takes the tried and tested mechanics of pong and modernises them by adding 'crates' to the playing field, when the pong ball hits a randomly placed crate, the state of the ball, playing field or the player changes, either providing an advantage or disadvantage to the player that last hit the ball.
In the game, there are the following crates:
- Point up: Player gets an extra point
- Point Down: Player loses a point
- Take Point: Player takes point from other player if they have any
- Change Theme: Level will flip to different theme
- Randomise Crates again
- Ball Speed up
- Ball Speed down
- Mystery Crate (does any of the above, but you don't know what until you hit it)
After each time player hits ball, ball speeds up slightly until a point is scored or a 'ball speed down' crate is hit.
Player plays against AI
https://rebound.michaeldsharp.com/
Game now suports mouse and touch interactions. You can tap or click on the main menu screen to get into the game, then you can control your player by holding down the mouse an dragging, or by touching the screen of your device and moving your finger sider to side to move the paddle.
- I would recommend installing MinGW to get the C++ compiler and Make, you might need to do a bit of googling to figure out exactly how to do that
- To get started, try looking at https://winlibs.com , reading the preamble and then grabbing one of the GCC Zip archives on the same page. You will need to download, extract and then add the location you've extracted to your PATH via control panel/windows settings, the ZIP file contains a bin folder that you should add to your PATH, and then you'll be able to run g++ (the C++ compiler) and make (the build system that this project uses to compile the desktop version of the game)
- Alternatively, there's a package manager for MinGW that works well to, it's hosted at https://sourceforge.net/projects/mingw/files/Installer/ and this allows you to install parts of MinGW (such as the g++ compiler and make)
- Download and Install the SDL developer libraries and add the location where you've installed the libraries to the
windows.Makefile
file, it's probably easiest just to place it in the same location i've placed it, as referenced in the Makefile. Links to builds of SDL and supporting libraries: - run
make -f build-scripts/windows/desktop.Makefile
and the game will build into thebin/windows
folder - The DLLs and assets required to run the game will also be pulled into the
bin/windows
directory, so if you runrebound.exe
, the game should start up and play correctly
-
You can obtain the SDL development libraries from your package manager, run the following commands:
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-image-dev
sudo apt-get install libsdl2-mixer-dev
-
once you have these libraries installed, you should be able to run
make -f ./build-scripts/linux/desktop.Makefile
and the game should build and bundle in the required assets -
you will now be able to run
rebound
frombin/linux
and all of the required assets and dependencies should be installed
- MacOS frameworks are a complete mess and break after each OS version, so I would recommend installing
SDL2
,SDL2_mixer
, andSDL2_image
usingbrew
. I've configured the Makefiles for building on Mac expecting those libraries to be in the directory where hombrew stores all of its packages if you do not already have homebrew installed, follow the instructions to install homebrew on your Mac, from https://brew.sh/ - run the following commands to install the required SDL libraries:
brew install SDL2
brew install SDL2_image
brew install SDL2_mixer
- run
make -f ./build-scripts/mac/desktop.Makefile
to build the desktop app to thebin/mac
folder - you will now be able to run
rebound
frombin/mac
and all of the required assets and dependencies should be installed
-
Please follow the tutorial for installing the emscripten SDK locally for your operating system, docs can be found at: https://emscripten.org/docs/getting_started/downloads.html
-
with the emscripten SDK (emsdk) enabled, run
make -f build-scripts/web.Makefile
and the game should build in theweb
folder, you should be able to host this folder like any other website and play the game
-
Build the project (see
Building the game for Windows
) -
Place your breakpoints wherever you want them
-
From the list of
Run and debug
tasks, selectDebug (with breakpoints in Windows)
and then press the green play button. -
You should be able to debug the project
-
Build the project (see
Building the game for Linux
) -
Place your breakpoints wherever you want them
-
From the list of
Run and debug
tasks, selectDebug (with breakpoints in Linux)
and then press the green play button. -
You should be able to debug the project
The MacOS launch config for debugging uses the LLDB debugger, as GDB doesn't support Apple Silicon yet.
You will need to install an extension called CodeLLDB
before attempting to run the debugging task for MacOS.
-
Build the project (see
Building the game for Mac
) -
Place your breakpoints wherever you want them
-
From the list of
Run and debug
tasks, selectDebug (with breakpoints in MacOS)
and then press the green play button. -
You should be able to debug the project