Making Strategic Board Game- “Bagh Chal”

Suman Kunwar
5 min readNov 10, 2019

Video games have gone mainstream- moving from clunky PCs and expensive consoles to the mobile devices we have in our pockets every day. Now more people than ever are playing. Whether it’s a casual single-player game, that can be played anywhere anytime on a smartphone, or Battle Royale games such as Fortnite, where squads compete to be the last ones standing, gamers have many choices. But it’s not just about playing video games, watching other gamers play online is becoming increasingly popular and now rivals the viewership of traditional sports among younger gamers.

This article is about how we built a strategic game- “baghchal” into an online video game and makes it available to people via Facebook instant games.

Bagchal is a strategic, two-player traditional board game that originated in Nepal. It is one of the most interesting hunting games (those games played between unequal forces with different goals, where pieces use to symbolize animals). Bagh in Nepali means tiger, and chal means move, hence you could translate it as the Tiger Moving Game or Move the Tigers.

The game is asymmetric in a way, that one player controls four tigers and the other player controls up to twenty goats. The tigers ‘hunt’ the goats while the goats attempt to block the tigers’ movements.

Game Description

Two sides take part in the game: 4 tigers trying to capture the 20 goats who defend themselves by blocking the tigers. The game board consists of a grid of 25 points with lines of valid movement connecting them (see graphic above).

Moves are made along the lines drawn on the board. Notice that there is not any line between some of the points that could be diagonally connected, so there are some restrictions.

Objective

Since forces are unequal, the objective is also different for both sides:

  • Goats must surround the four tigers so that any of them can’t make any valid move according to the following rules.
  • Tigers win if they capture five goats.
    Sometimes it is said that tigers must capture all the goats to get the victory, but in practice when several goats are captured their possibilities of blocking the tigers are very few, so it is not worth extending the game when five goats have been already captured.

How the game goes on

Before the start of the game, pieces are placed as follows:

  • The twenty goats are placed out of the board.
  • The four tigers are placed in the four corners of the board.

Players move alternatively, starting the goats. The actions made by goats divide the game into two phases:

  • While all the 20 goats have not been placed on the board, the only possible move is to place one of them at one of the free junctions of the board.
  • After all the goats have been placed on the board they may be moved from their position to any adjacent junction following any straight line.
  • A tiger or goat cannot move a piece in such a way that a similar position appears repeatedly on the board.

The tigers, during the game, may perform two kinds of movements:

  • Same as goats, they may be moved along any of the lines to an adjacent junction.
  • They also may capture one goat placed on an adjacent junction by jumping over following a straight line and landing on the next junction adjacent to the position occupied by the goat.

Sometimes the game could fall into a repetitive cycle of positions; especially goats may use this resort to defend themselves from being captured. In order to avoid this kind of situation, an additional rule has been established:

  • When all the goats have been placed, it is not allowed to perform any move that causes any situation of the pieces that have been already repeated during the same game.

Architecture

Since it's a two-player game, people can play it either with a computer or with their friends.

While playing with the computer, possible moves were calculated with the help of minmax algorithm. In Minimax the two players, tiger, and goat are called maximizer and minimizer. The maximizer tries to get the highest score possible while the minimizer tries to do the opposite and get the lowest score possible. When we play with the computer, a goat is a minimizer and the tiger is a maximizer. So basically, if the player chooses to play as a goat, the computer will be the tiger and will try to score the maximum score possible and vice versa.

With the help of Facebook Instant Games SDK and some custom real-time server, we were able to support our two-player logic.

Instant Games SDK users can find and play games directly in the News Feed or Messenger conversations for both desktop and mobile devices.

The architecture is pretty simple for two-player, a player can pick friends whom they want to play with. After accepting the game invitation, a socket connection is established throughout the game. Each movement in the game is recorded and preserved. After the completion of the game, a winner is decided.

You can play the game online here:

Open Link: https://bagh-chal-dd292.firebaseapp.com

Facebook Instant Game Link: https://fb.gg/play/375985399708837

For Source Code: https://github.com/sumn2u/baghchal

Conclusion

In this way, we create our very old game bagchal and make it available to people. There are lots of games that have been forgotten which have their own importance. I believe our small effort will help to keep the memory alive and breathe new life into happiness!

If there are any suggestions I would love to hear about them.

--

--

Suman Kunwar

Innovating Sustainability | Researcher | Author of Learn JavaScript : Beginners Edition