A C++/OpenGL recreation of the classic Marble Solitaire board game, built as part of a Computer Graphics with C++ coursework.
Marble Solitaire challenges you to clear the board down to a single marble by “jumping” marbles over one another and removing the jumped marble.
- Start with the board filled except for one empty hole in the center.
- Click a marble, then click an adjacent empty spot two spaces away to jump and remove the in-between marble.
- Keep playing until no moves remain or you’ve won by leaving just one marble.
This project showcases:
- 🎨 Custom 3D assets — board and marbles modeled in Blender
- 🔊 Audio design — sound effects & background music via irrKlang
- 💻 Core OpenGL coursework concepts
- 📐 Geometric primitives & transformations
- 🎥 Projection, view matrices & camera
- 💡 Lighting & shading
- 🖥️ GLSL vertex/fragment shaders
- ✔️ 3D board & marbles rendered with modern OpenGL
- 🔧 Code-level board layout selection — choose a preset (e.g. “plus”, “cross”, “diamond”) by passing it to
GameController::newGame()in your source before building (not a runtime option) - 🔄 Rotate board by holding the right mouse button and dragging
- 🧱 Self-modeled Blender assets for a polished look
- 🎶 Background music and jump sound effects
- ❌ No scoring system or move/time tracking
- ❌ Winning marble may end anywhere (should be center)
- ❌ No undo, hint, or “solve from here” assistance
- ❌ No choice of board configuration as part of the gameplay
- Language: C++
- Graphics: OpenGL, GLEW, GLFW, GLM, SOIL2
- Audio: irrKlang
- Modeling: Blender (.obj assets)
- Build: Visual Studio solution (
.sln)
- Clone the repository
git clone --recurse-submodules https://github.com/patrykkuta/marble-solitaire.git cd marble-solitaire git submodule update --init --recursive - Open MarbleSolitaire.sln in Visual Studio
- Build & Run
- Press Space to start the game
- Click a marble, then click an empty spot two spaces away to jump
- Continue until you clear all but one marble or no moves remain
💡 Tip: Hold the right mouse button and drag to rotate the board view.
- Fork the repo
- Clone your fork
git clone <your-fork-url> cd marble-solitaire
- Create a feature branch
- Commit your changes & push
- Open a Pull Request
This project is released under the MIT License. See LICENSE for details.

