A simple game about chugging milk built in C.
Report Bug
·
Request Feature
·
Contact
Table of Contents
This is a simple 2D game about a milk chugging competition. This project was built in C using the SDL2 library.
Download a Linux AppImage, a MacOS App, or a Windows Executable.
To get a local copy up and running follow the steps below:
You require a C compiler compatible with the C17 standard. On Windows, this project is configured to use the MinGW gcc compiler. If building on Windows, ensure a version of MinGW for your architecture is installed and set correctly on the PATH
system variable.
This project uses CMake as a build tool. You require a minimum version of 3.21. CMake can be downloaded from the website or through a package management tool on relevant OS distros. If on Windows, ensure CMake is set correctly on the PATH
system variable.
E.g. on Arch-based distros:
sudo pacman -S cmake
And on MacOS:
brew install cmake
Install SDL2 and the required extension libraries: SDL2_image, SDL2_mixer, and SDL2_ttf
-
Linux: Download the libraries using the above links or your package manager of choice. E.g. on Arch-based distros:
sudo pacman -S sdl2 sdl2_image sdl2_mixer sdl2_ttf
-
Mac: Download the
.dmg
for each library and copy each respective.framework
directory into/Library/Frameworks
. Note that installation through homebrew will not provide the required.framework
files. -
Windows: Download the
tar.gz
files and extract the library directory for your device's architecture (eitheri686-w64-mingw32
orx86_64-w64-mingw32
). Rename each corresponding folder toSDL2
,SDL2_image
, etc. for convenience and move them to theC:/
drive where they can be found by theCMakeLists.txt
.
Clone the repository. Create a build directory if one does not already exist, and navigate inside it.
git clone https://github.com/ndugdale/milk-chug-game.git
mkdir -p milk-chug-game/build
cd milk-chug-game/build
Build using CMake. This will generate an executable named MilkChug
in the bin
directory.
cmake ..
cmake --build .
cmake --install . # only required on windows to install dll files to bin
cd ../bin
./MilkChug
Running the build.sh
or built.bat
scripts in the root directory will package the project differently according to the OS. The packaged app or installer will be located in the install
directory.
On Linux or Mac:
./build.sh
On Windows:
.\build.bat
- Linux:
MilkChug-Linux-<ARCHITECTURE>.AppImage
- Mac:
MilkChug-MacOS-<ARCHITECTURE>.app
- Windows:
MilkChug-Windows-<ARCHITECTURE>.exe
Distributed under the GNU GPLv3 Licence. See LICENCE.md
for more information.
Project Link: https://github.com/ndugdale/milk-chug-game
This project was only possible due to the works of others, and so I would like to extend a thank you to the following creators:
- Music: Fupi
- Sound Effects: thisusernameis, iwanPlays