Skip to content

hritika20002/Hritika_MultiplayerGameSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Multiplayer Tic-Tac-Toe Game Simulation using Python Sockets

Overview This project is a two-player multiplayer Tic-Tac-Toe game built using Python sockets and Tkinter. A central server coordinates gameplay between two clients, ensuring synchronized moves and fair ordering in the presence of simulated network latency and clock drift. This project was developed as a school project to demonstrate concepts in distributed systems, networking, and synchronization.

Key Features Client–server architecture using TCP sockets Real-time multiplayer gameplay Cristian’s Algorithm for clock synchronization Server-side action ordering using timestamps Simulated network latency and clock drift Neon-styled Tkinter GUI with animations Winner detection, draw handling, and visual effects

Technologies Used Python Socket Programming Threading Tkinter (GUI) JSON messaging Distributed systems concepts (time synchronization, ordering)

How It Works Players connect to a central server. Each client maintains a local clock with simulated drift. Actions are timestamped and sent to the server. The server assigns authoritative timestamps and broadcasts actions in order. All clients update game state consistently.

How to Run Start the server: python server.py Run the client on two separate terminals: python client.py Enter player names and begin the game.

Educational Focus This project focuses on: Distributed coordination Clock synchronization Message ordering Concurrent client handling

Future Improvements Support for more than two players Persistent game state and replay Improved fault tolerance and reconnection handling Separation of game logic from UI

About

A two-player Tic-Tac-Toe game built with Python sockets and Tkinter. Players connect to a central server, and all moves are synchronized using Cristian’s Algorithm to handle clock drift and ensure fair, ordered gameplay. Includes real-time action updates, simulated latency, neon-styled GUI, winner animations, and personalized victory messages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages