Skip to content

A C++ and SDL based game with image and audio component.

License

Notifications You must be signed in to change notification settings

Sangam-ghimire/Bagchaal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bagchaal Game

Bagchaal is a traditional board game played in Nepal. This project is a digital implementation of the Bagchaal game using C++ and the SDL library. It allows users to play against the computer or against another player.

Features

  • Play against the computer: Users can choose to play against the computer as a single player(under development phase).
  • Two-player mode: Users can play against another player on the same device.
  • Interactive UI: The game provides a user-friendly interface with graphical representations of the board and game pieces using SDL.
  • Game rules: The project includes the rules of Bagchaal to help users understand the gameplay.
  • Turn-based gameplay: The game follows the turn-based gameplay of Bagchaal, allowing each player to make moves alternately.
  • Win condition: The game detects and declares a winner when a player successfully captures all of their opponent's game pieces.

Motivation behind developing it

  • Cultural preservation: This type of Baghchal has been a long lived game in our society and represents, preserves and promotes a long lived cultural heritage.
  • Entertainment and recreation: Baghchal provides enjoyable leisure and friendly competition.
  • Educational value: Baghchal teaches strategic thinking and problem-solving skills.
  • Community building: Baghchal fosters a sense of community and social interaction.
  • Economic opportunities: Baghchal can stimulate attract foreigners and help generate revenue through gaming tourism.
  • Personal fulfillment and creativity:It has been an integral parts of my childhood and developing Baghchal allows for expression of creativity and passion for gaming.

Learnings

  • Mastering SDL basics: Setting up the environment, handling events, and managing the game loop.
  • Graphics and rendering: Creating visuals for the game board, pieces, and animations.
  • Input handling: Implementing user interactions with mouse or keyboard inputs.
  • Game logic: Developing rules, player turns, movements, capturing, and game outcomes.
  • Sound and audio: Adding sound effects and music using SDL's audio features.
  • User interface and menus: Designing user-friendly interfaces for menus and options.
  • Testing and debugging: Ensuring the game functions correctly and resolving issues.
  • Optimization and performance: Helped to learn a great bit on how to approach improving efficiency and resource management.
  • Collaboration and teamwork: The gaming community is huge and so is developing games. Reaching out and connecting to them help me grow and learn things quickly.

Technologies Used

  • Programming Language: C++
  • Game Library: SDL (Simple DirectMedia Layer) along with it's image and music handling packages One can find all the resources needed to deal wiht SDL and parts at: "https://wiki.libsdl.org/SDL2/FrontPage"
  • Version Control: Git

How to Run the Game

  1. Ensure you have a C++ compiler and SDL(image and music too) library installed on your machine.
  2. Clone this repository
  3. Navigate to the project directory
  4. Compile the source code
  5. Run the game

Game Flow

Game Flow

Gamestate Flow

Gamestate Flow

Gamestate Machine Flow

Gamestate Machine Flow

Some Mid Game Snaps

Board

GameOver Menu

Controls

  • Mouse: Use the mouse to select and move game pieces on the board.
  • Keyboard: Use the keyboard arrow keys to navigate and select options in the game menu.

Future Enhancements

  • Improved AI: Enhance the computer player's intelligence to provide a more challenging gameplay experience.
  • Network multiplayer: Implement an online multiplayer mode to allow users to play against each other remotely.
  • Game statistics: Track and display game statistics, such as the number of wins for each player.
  • Sound effects and music: Add further advance audio elements to enhance the gaming experience.

Contributing

Contributions to the project are welcome! If you find any issues or have ideas for improvements, please feel free to open an issue or submit a pull request.

About

A C++ and SDL based game with image and audio component.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages