Development and comparison of a Connect 4 multiplayer game using different networking solutions

Unity • C# • Multiplayer • Networking

My bachelor's thesis focused on developing and comparing different networking solutions for a multiplayer Connect Four game in Unity. The project consists of three separate implementations using Unity Netcode for GameObjects, Photon, and Alteruna.

The goal was to explore how different networking solutions could be used to implement the same multiplayer game and to compare their development process, features, and practical differences.

The thesis is written in Finnish and can be accessed through the link below.


About the Thesis

The project is a multiplayer version of the classic Connect Four board game. The game was developed three times, with each version using a different networking solution.

The implementations were built in Unity and programmed using C#. The main focus was not only on creating a playable multiplayer game, but also on understanding how the different networking technologies affected the development process and the final implementation.


Networking Solutions

Unity Netcode for GameObjects

The first implementation uses Unity Netcode for GameObjects (NGO). This version uses Unity's networking framework to synchronize the game state and handle communication between players.

Photon

The second implementation uses Photon for multiplayer networking. The project uses Photon to handle communication between players and synchronize the Connect Four game.

Alteruna

The third implementation uses Alteruna as the networking solution. This provided another approach to implementing the same multiplayer functionality.


Technical Details

Gameplay ⚙️

The game follows the traditional Connect Four rules. Players take turns dropping pieces into a seven-column, six-row board. The game keeps track of the current turn, validates moves, and detects the winning condition.

Networking 🌐

A major part of the project was synchronizing player actions and the game state between connected clients. Different networking solutions required different approaches to handling networked objects, communication, ownership, and remote procedure calls.

Programming 💻

The project was developed using Unity and C#. I worked with network behaviours, remote procedure calls, synchronized game states, player turns, and networked game objects.


Challenges ❌

One of the main challenges was adapting the same game logic to three different networking solutions. Each framework had its own way of handling communication and networked objects.

Debugging multiplayer functionality also required testing the game with multiple clients and identifying whether problems originated from the gameplay logic or the networking layer.

Some of the challenges I encountered

  • Synchronizing game state between multiple players
  • Handling player turns over the network
  • Managing network ownership
  • Calling server-side functionality from clients
  • Debugging differences between local and networked behaviour
  • Adapting the same gameplay logic to different networking frameworks

What I Learned 🛠️

The project gave me practical experience with multiplayer game development and helped me understand the differences between networking frameworks in Unity.

More importantly, I learned how networking architecture affects gameplay code and how to approach debugging problems where the behaviour of a game depends on communication between multiple clients.


Thesis Information

  • Title: Neljän suora -moninpelin kehitys eri verkkoratkaisulla ja niiden vertailu
  • Author: Aleksi Heikkinen
  • Degree: Bachelor of Engineering, Information and Communication Technology
  • Specialisation: Game Development
  • Institution: Metropolia University of Applied Sciences