← All Projects
Completed
March – April 2025

Networked Online Multiplayer Video Game in C#

C# Networking Game Dev Multiplayer TCP/IP

Overview

A fully networked online multiplayer version of Snake, themed after the Dune universe (sandworms, spice harvesting, Arrakis desert aesthetic), with a live server-side leaderboard. Built in C# as a class project focused on networked software development. Multiple players connect to a central server and compete in real time, with the leaderboard updating live as the game progresses.

Background

Snake is a classic game with deceptively simple mechanics: a player controls a growing line that must avoid colliding with walls and itself while collecting items. Its simplicity makes it an ideal vehicle for exploring networked game development, because the core game state is small and well-defined, but the networking challenges are representative of real multiplayer games.

The Dune theme was chosen for creative flavor. Players control sandworms navigating the Arrakis desert, collecting spice (the items), and the leaderboard tracks spice accumulated by each player. The thematic coherence made the project more enjoyable to develop and more entertaining to play.

The class prompt required implementing a client-server architecture with multiple simultaneous clients, demonstrating understanding of socket programming, network protocols, and concurrent server design.

Technical Details

The architecture uses a client-server model with a dedicated game server:

Discussion

The most technically challenging aspect was handling the fundamental tension in multiplayer games between consistency and responsiveness. With a pure server-authoritative model, every player action must make a round trip to the server before the player sees any response, which feels laggy. With pure client-side prediction, clients can desync.

For this project, the chosen approach was server-authoritative with no client-side prediction, which is correct but produces noticeable input lag on high-latency connections. The leaderboard—pushed from the server to all clients whenever scores change—required careful handling to avoid flooding clients with updates when many players are scoring simultaneously.

The project was a strong introduction to the realities of networked software: that the happy path (everyone connected, low latency, no packet loss) is easy, but handling disconnections, reconnections, and network jitter gracefully requires deliberate engineering.

Interactive Playground

A browser-based version of the game with WebSocket networking is planned. Check back later.