TCP Multiplayer Game

Systems Programming • 2025 • Course Project

Overview

A concurrent TCP server in C that hosts rock-paper-scissors games between remote players with support for rematches, requeueing, and process-based concurrency.
Role: Systems Programmer
Tools: C, TCP Sockets, fork(), Linux

Problem

Build a multiplayer game server capable of hosting real-time rock-paper-scissors games between clients, with proper concurrency, rematch support, and graceful handling of quit/rejoin behavior. The challenge was to maintain a smooth and responsive experience despite unreliable clients, competing rematch logic, and race conditions from forking processes.

My Approach

Final Build

Developed in C using TCP sockets and fork() for concurrent game sessions Fully supports game state tracking, valid rematch cycles, quit behavior, and malformed input handling Passed all course test cases, including complex quit/requeue edge conditions

Final build screenshot

Reflection

This project pushed me to deeply understand concurrency, networking, and lifecycle management in Unix. Debugging zombie processes and socket reuse taught me the importance of careful process cleanup and player state tracking. I’m proud of implementing full rematch and requeue support without race conditions—this was my most technically complex C project to date.

← Back to Portfolio