Skip to content

Abdullah-Masood-05/Ludo_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ludo Game 🎲

A classic Ludo board game implementation using C++ and SFML, featuring multiplayer support, graphical elements, and sound effects.

Table of Contents

Features ✨

  • 2-6 player support
  • SFML-based graphical interface
  • Dice roll animations
  • Sound effects and background music
  • Color-coded player pieces
  • Interactive game board

Prerequisites 📦

  • SFML 2.5.x
  • C++17 compatible compiler (GCC, MSVC, Clang)
  • CMake (recommended)

Installation ⚙️

Linux

# Install SFML dependencies
sudo apt-get install libsfml-dev

Windows

  1. Download SFML binaries
  2. Add SFML include directory to your IDE's include paths
  3. Link SFML libraries (graphics, window, system, audio)

Building 🛠️

Using CMake (Recommended)

mkdir build && cd build
cmake ..
cmake --build .

Manual Compilation

g++ -std=c++17 -I./include -I/path/to/sfml/include *.cpp -o Ludo \
-L/path/to/sfml/lib -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio

Running 🚀

# Linux
./Ludo

# Windows
Ludo.exe

Gameplay 🎮

  1. Launch the executable
  2. Select number of players (2-6)
  3. Click the dice to roll
  4. Move pieces according to dice value
  5. Reach the center to win!

Controls:

  • Left click: Select pieces
  • Spacebar: Roll dice
  • ESC: Exit game

Project Structure 📂

├── CMakeLists.txt          # Build configuration
├── src/
│   ├── Main.cpp            # Entry point
│   ├── Game/               # Core game logic
│   ├── Board/              # Board rendering
│   ├── Pieces/             # Player piece implementations
│   └── Players/            # Player management
├── assets/
│   ├── audio/              # Sound effects and music
│   ├── fonts/              # Font files
│   └── textures/           # Game sprites and images
└── external/               # SFML dependencies (if included)

Code Overview 📚

Component Description
Game.cpp Main game loop and state management
Board.cpp Board rendering and collision detection
Piece.cpp Piece movement and animation logic
Player.cpp Player turns and piece management
Dice.cpp Dice rolling mechanics
SoundManager.cpp Audio playback and resource management

License 📄

This project is licensed under the MIT License - see LICENSE file for details.

About

Ludo Game is a C++ multiplayer board game built with SFML, featuring a fully interactive graphical interface, dice animations, and sound effects. It supports 2–6 players and implements core game mechanics like turn-based movement, piece progression, and win conditions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors