You will build a multiplayer Connect4 game from scratch in Python using PyGame and sockets.
You will build a multiplayer Connect4 game from scratch in Python using PyGame and sockets.
Have you ever played a multiplayer game? Have you ever wondered what happens behind the scenes when you shoot a bullet in Counter-Strike or PUBG? Have you ever thought about how multiplayer games are synced across devices? If you want to get these questions answered this is the right project for you.
In this project, you will get a chance to learn some important fundamentals of networking and game design, and use them to build the famous multiplayer game Connect4 on your own.
Connect 4 is a famous game that comes in various variants. The gist of the game is to get four coins in a straight line in any direction (top to bottom, left to right, or diagonals) before your opponent does the same. For rules of the game refer here.
A demo of the game is as below:
A walkthrough of the game and it's superficial modules is as below:
This Product Architecture consists of 4 stages as follows:
You will build a multiplayer Connect4 game from scratch in Python using PyGame and sockets.
Have you ever played a multiplayer game? Have you ever wondered what happens behind the scenes when you shoot a bullet in Counter-Strike or PUBG? Have you ever thought about how multiplayer games are synced across devices? If you want to get these questions answered this is the right project for you.
In this project, you will get a chance to learn some important fundamentals of networking and game design, and use them to build the famous multiplayer game Connect4 on your own.
Connect 4 is a famous game that comes in various variants. The gist of the game is to get four coins in a straight line in any direction (top to bottom, left to right, or diagonals) before your opponent does the same. For rules of the game refer here.
A demo of the game is as below:
A walkthrough of the game and it's superficial modules is as below:
This Product Architecture consists of 4 stages as follows:
First validate the idea by doing a low level implementation (Proof of Concept) of the components involved in the project UI built in PyGame.
This helps you to:
Target building the game window, and adding user interactions like handling clicks (or key presses) in this module.
On completion of this module you will have a UI similar to something shown below. The UI will be able to identify and handle click events by user and identify the row and column clicked.
In this module we implement the algorithm which drives the game and is used to determine if the winning condition is met by any user or not.
At the end of this milestone you will have your algorithm to check for win in Connect 4 ready.
In this module we start by implementing a POC (Proof of concept) program using socket connection for communication. We then move this into our game to start transmitting the game data across instances.
After this task is done you will have a fully functional Connect 4 game where user action on one instance will be reflected on the other instance.
In this module we use everything we have learnt until now to add a scoreboard to the game which keeps track of the score and indicates the active player who needs to make the move.
After this milestone is completed you'll have a fully completed Connect 4 game with a score tracker.