Skip to content

damccant/cat-n-mouse

Repository files navigation

Cat N' Mouse Game

Cat N' Mouse 2D Game built with C++ and OpenGL.

Cat N' Mouse features:

  • Made in C++ and OpenGL with custom game engine and OpenGL shaders/meshes
  • Randomly generated maze (generated by custom implementation of randomized depth-first search algorithm)
  • Intelligent pathing (custom implementation of A* algorithm)
  • Complete game (win/loss conditions, pause, etc.)

Building

Building on Windows

Requires MinGW, GLFW and OpenGL. The software also requires the GLM and glad libraries, but these header-only libraries are included in this repository.

  1. Install MinGW, download from here. Ensure mingw32-gcc-g++ is selected in MinGW Installation Manager before proceeding.
  2. Install GLFW and OpenGL.
  3. Run MinGW make
cd cat-n-mouse
mingw32-make
  1. Run the game
./catnmouse.exe

Building on Linux

Requires gcc, g++, pkg-config, GLFW and OpenGL. The software also requires the GLM and glad libraries, but these header-only libraries are included in this repository.

Instructions are given with Debian-based package managers (apt)

  1. Install gcc and g++ (if not already installed)
sudo apt-get install gcc g++
  1. Install pkg-config (if not already installed)
sudo apt-get install pkg-config
  1. Install OpenGL
sudo apt-get install libgl1-mesa-dri
  1. Install GLFW
sudo apt-get install libglfw3 libglfw3-dev
  1. Compile the code
cd cat-n-mouse
make
  1. Run the game
./catnmouse

Running the pre-built binaries

The pre-built binaries have been compiled statically, meaning that no extra libraries are required to run them.

Windows

Run the provided .exe file. If prompted, click Run.

Linux

Run the provided executable. This executable is linked against libc, so ensure that it is installed.