September 2024

Tanks

OVERVIEW

Links

Overview

A top-down networked multiplayer tank game where you have to battle other players by strategically bouncing projectiles off walls. This project was created for a second year university module.

Timeline

2 months


FEATURES

Project Features

Room System

Each server can run multiple instances of a game using rooms. Rooms can be queried by clients and joined using unique alphanumeric codes.

Multiple Game Modes

Each room supports the 4 available game modes: Duels, 3 Player FFA, 4 Player FFA, and Teams. This can be seen in the online matchmaking menu shown in Figure 1.0.

1.0 The available modes in Tanks IMAGE

Matchmaking

Players can join matchmaking for one of the four game modes and are shown the screen in Figure 1.1. Once enough players are in the queue for a certain game mode, a room is created and the players are shown the match found screen in Figure 1.2.

1.1 The matchmaking screen in Tanks IMAGE
1.2 The match found screen in Tanks IMAGE

Spectating

Players can view active games in the spectating menu shown in Figure 1.3. When a player requests to join a game they will be put on the waiting screen showin in Figure 1.4. Once the round finishes, they will be put into the game screen and receive the same updates as other players. Spectators also have an overlay with a leave button as shown in Figure 1.5.

1.3 Spectate menu in Tanks IMAGE
1.4 The spectator waiting screen in Tanks IMAGE
1.5 The overlay shown to spectators in Tanks IMAGE

Chat

Shown in Figure 1.6, the game has a chat that allows players in the game to communicate. Spectators can also use the chat but their messages are displayed in grey.

1.6 The chat in Tanks IMAGE

Prediction

To minimise network traffic, players only send inputs over the network. Other players then replicate the received input on their client.

Desynchronization prevention

To minimise desync, occasional transform sync packets are sent to make sure each players tank has the same position and rotation on all clients.


DIAGRAMS

UML Class Diagram

Server Side

Below is the UML class diagram representing a server in my project.

2.0 Server class diagram IMAGE


DETAILS

Technical Details - Server

Server Class

Below is the UML class diagram representing a server in my project.

UNDER CONSTRUCTION

This project write-up is still being worked on, sorry for the inconvinience.