Online games can be highly demanding on computer networks. They require both high bandwidth and low-latency communication, often between large groups of players.
Assignment Description
In this assignment, you design, implement, and demo your own online-multiplayer game. To participate in this assignment, you first need to write a plan for your game and get it approved. Your plan must at least contain the following three parts:
A description of the game itself, and how it is played.
A design of your game, including its networking requirements. To get your plan approved, you must show that these requirements pose sufficient networking challenges. Examples of sufficiently challenging designs are:
Design a (real-time strategy) game that uses lock-step simulation15 and UDP.
Design a high-paced shooter game that uses dead-reckoning and UDP.
Design a game where one of the clients functions as the server, but can recover if this client/server fails.
We also appreciate advanced and new ideas. Do not be afraid to be creative!
A description of your approach, and how this will meet your requirements.
Discuss your plan with the teacher before getting started. Plans are only approved if their requirements are sufficiently complex. If you plan to complete this assignment, submit your game plan several weeks before the assignment deadline and assume that your plan will require several rounds of feedback before it is approved. If your plan is not approved, you cannot complete this assignment.
Requirements
Submit your plan on Canvas.
Your plan must be approved by the teacher.
Build your game such that it meets the agreed-upon requirements.
Evaluation
Demo your game to, or play your game with(!), the TA. Show the TA the source code and explain how your game works, how your game meets its requirements, and how you solved challenges encountered along the way.
Template for Game Plan
The Game Plan must be submitted and approved before implementing the game assignment. Be aware that the principal component of your project needs to be represented by the networking side.
Title:
Write down what you want to call your game. Be creative!
Game Description:
This section presents a high-level description of your game.
What is the overall goal of your game?
Are there any specific roles within the game?
How will players interact with the game world? With each other?
How is networking the core element of your game?
Design:
Provide a general overview of the game you intend to implement alongside screenshots of existing games or a simple mockup designed by you.
Networking:
Will your game utilize a special network architecture (e.g. peer-to-peer or client-server)?
Why did you choose your game?
Provide a diagram of the network topology used in the game.
Advanced Networking Features:
Why is your game challenging to implement?
What networking features do you want to implement in your game?
How do you plan to implement the challenges?
What are the completion criteria for each requirement?
How can you test each requirement to ensure it is implemented correctly?
Provide at least two functional and two non-functional requirements respecting the following format:
We are looking forward to seeing your great ideas!
Example of past Game Plans
Online Multiplayer Pong
Title: Pong
Game Description:
The game will feature a lobby that connects players with their online opponents. When there is only one player in a lobby, or if a player cannot yet be matched with another opponent, they will be shown a friendly message asking them to wait. Once two different players are matched, the game starts. In the game, there is a moving ball initially heading towards one of the players. The ball bounces off the horizontal walls and players’ rackets. Players can move their rackets to deflect the ball from the vertical wall behind them. If a player fails to position their racket to deflect the ball, and the ball goes past their racket, their opponent's score increases by 1. The game continues until one of the players reaches a score of 13.
Design:
Networking:
The game will use a client-server model and the UDP protocol for better responsiveness. When connecting to the game, clients will send a message requesting to join the game until they receive an acknowledgment from the server. The server will keep track of players who want to play and, whenever there is a pair of players, will send messages informing the clients that the game has started. When both clients acknowledge the start of the game, the game begins. Throughout the game, the server will send the ball's position, scores, time of send, ball direction, player rackets’ positions, and player rackets’ directions in JSON format. Clients will examine the time of arrival and the last time a packet was sent and use dead-reckoning to calculate where the ball is supposed to be at the current moment. Clients will then respond with the positions of their rackets, direction, and time of send. The server will examine clients’ current and previous racket positions and, using packet timestamps will determine whether the move was possible under normal, "non-hacked" game conditions. If a client fails this check, they will be kicked out of the game. The server will also use dead-reckoning to determine where the rackets should be, and this position will be used for all game-related calculations.
Advanced Networking Features:
Functional and Non-Functional Requirements:
Title: Hostless Terraria
Game Description:
The game is a tile based box game in which you can shape your own world together with other people. Anyone should be able to join the game, regardless of whether or not the original world creator is online, as long as at least one player is currently playing. The game should recover from any of the players disconnecting during a game, and should bring the disconnected player up to date when they reconnect. This approach should use no dedicated server to minimize cost of operation, but synchronize the entire game state between all players in a peer-to-peer fashion, making sure the actions of one player are seen by all the other players.
Design:
Networking:
Anyone should be able to join the game, regardless of whether or not the original world creator is online, as long as at least one player is currently playing. The game should recover from any of the players disconnecting during a game, and should bring the disconnected player up to date when they reconnect. This approach should use no dedicated server to minimize cost of operation, but synchronize the entire game state between all players in a peer-to-peer fashion, making sure the actions of one player are seen by all the other players.
This is challenging because the world is a state that needs to be synchronized between potentially very many people, but it is in nature infinite in size, which means simple approaches to synchronization will not work. It is also challenging because players need not be constantly connected to the game, but must have the entire state brought up to date when they connect.
Advanced Networking Features:
Functional and Non-functional Requirements:
Last updated