Networked Multiplayer Asteroids

Course: CS260

Instructor: Iker Silvano

Type: Duo project, I worked with Mikel Orrantia Robles

Language: C++

Overview

During this course I worked with the Winsock API using TCP and UDP protocols for different small projects, simple console based multiplayer chess game and peer to peer file sharing respectively.

The final project consisted on converting an already implemented single-player version of the asteroids game into an online-multiplayer game by using UDP. I designed and implemented the networking system and then Mikel was in charge of using this system to send and receive all the messages.

Networked Game

In this video you can see a match with three players, top left window is the server and the rest are players. Due to recording issues I am playing in one player at a time, you can see how all screen show the same world state, (the messages are been sent using UDP, you have to trust me in this).

Replay system

Thanks to the abstraction of the networking module we could easily implement a replay system. By storing and saving to file all the messages, with the corresponding time-stamp, that passed through the server a match can be 100% reproduced. Only thing left was to replace the module dispatching the messages , in a multiplayer game would be the server, with one that read this data from a file.

This is the replay of the previous match. (TIP: Play two videos at the same time)

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: