Assignment Four

Handball

Assignment 4: Multiplayer Extension



Project Description

In this assignment you will take the single player game platform you produced in Assignment 2 and 3 and extend it into a multiplayer game platform that connects players on at least two machines by a local network. You will continue to work in the same teams as Assignment 2 and 3 unless special arrangements have been made.

The basic requirement of this assignment is to make a game playable between multiple players connected by a network. By the end of this assignment, you will have a game that has both single player and multiplayer modes. In multiplayer, each player will have their own machine, controls, display, etc, but the game will be played in a shared environment. The actual game design is up to you, but make something that's sensible for both modes of play.

The "game technology" extension is to add in some advanced networking feature to handle one of the situations discussed in class (e.g. grid/aura systems, massively multiplayer handling, low-level socket programming, security concerns, etc).

Basic Requirements

Extra Credit

Milestone 1

The milestone will be a substantial part of your grade, as this class is about planning and organization. Thus you will want to put in a significant amount of effort on the milestone documentation. I'd recommend starting as soon as possible to come up with a plan and a division of labor then flesh out your documentation as you realize you are encountering unexpected issues/situations.
  1. Documentation: You will turn in a document with the following information:

    • Overall design of your network. How are you thinking about the client-server system? What information will be reliable/unreliable, and when will you send it? What is the user flow for joining/leaving a game? Consider these and other questions that arise while planning your networked player experience.
    • Software architecture and plan. How does you structuring of scenes/classes help you implement networking? How are you keeping track of game state, and how will the client machine know when that state changes? Estimate how much work it'll take to incorporate each of the required capabilities. If it looks like you won't be able to meet your deadline, how can you scale back during the second week?
    • Engine extension. Describe the problem you'll be solving and the engine extension you'll be incorporating in your base game to solve it. Include a plan for what code structures are necessary and how you will create a tool for solving this problem in a scalable, flexible way.
    • Division of labor. In terms of the delivered capabilities, who is responsible for which parts of the code, and what is your plan for meeting up? My experience is that teams who meet up and code together on a regular basis create a more cohesive, functional project than teams where everyone works autonomously and tries to come together at the end. Keep this in mind during your planning stage.

      Note that you should also specify who has done what at this point in the project. Since the milestone is now a substantial percentage of the project's grade, your milestone grade will be adjusted based on your contributions to the code base during this phase of the project.

  2. Project Demo: You will also link an initial demo of your proposed game for Milestone 1.

    This demo can be simple, but we should see a working prototype in GDScript so we can gauge whether or not you're on track.

    Please include some video footage showing your game in both client and server modes. You may want to include some subtitles explaining what's happening in the footage you are showing.

Final Submission

You should turn in a link to your git repo as you did in the previous assignment. Make sure you have your file structure and SCons files set up correctly to minimize build pains. Please also make sure you included all relevant files, including those related to the Godot project, the C++ bindings, and your own source/library files. Also include:

Getting Started

You are allowed to prototype with GDScript to get things working, but for more advanced features, you may want to extend/use Godot's ENet wrapper, ENetMultiplayerPeer, which will handle much of the lower level details for you.

It will not be necessary for your code to manage more complex networking issues like connecting through firewalls or across NAT routers, but keep in mind those things may be issues depending on your teammates' home situation (if you have issues, you may want to test on a local network/hotspot). I would start by working with server and client on the same machine and testing functionality locally before trying it across a network.

This networking development will focus on player experience, so you should take time to consider:

In terms of the nextworked game mode, once connections are established, each instance of your code will manage the game on behalf of its local player. You must be careful to maintain a consistent view of the shared game environment across all players. There are several ways you can do this:

In terms of software architecture, making networking tractable will require a bit more consideration of the overall architecture of your code than the previous assignment did. If you haven't already, you should strongly consider abstracting your game objects and control interfaces to allow event-based messaging at a level that treats local mouse/keyboard command inputs and remote network-sourced command inputs the same way. Likewise, other message events conveying information between game objects should treat the network transparently. That is to say -- the underlying code should not change for single versus multiplayer modes.

Likewise, you should consider a systematic approach to separating your code's behaviors according to the global game state or mode. For instance, if you are interacting with the user via UI screens, that's a different mode than if you're in the middle of "combat". User inputs are directed to different parts of your software in each mode, and the rendering loop is putting different stuff on the screen in each case. Since you'll be in at least two UI screen modes at the beginning of the game when choosing game mode, establishing connections (and possibly setting up other game parameters), you will have at least three modes on interaction (include game UI and controls) in your project.

You may be tempted to make general upgrades to your game in addition to the basic networking requirements outlined above. Perhaps you didn't finish some things last time. Perhaps you finally figured out what you want to do, or how to do it. Such upgrades are cautiously encouraged, provided you make your first priority getting the basic requirements done. Any additional upgrades will be considered for extra credit to mitigate points lost on Assignment 2 and 3.

Turning it in

We'll use Canvas as with previous assignments. Only one teammate needs to turn in the assignment (and milestone) linking to your git repository's code-freeze branch. Please make sure you README on the git repository includes (or links to) the final report (including screenshots, code details etc), as well as a link to video footage of the final project. Be sure to add both me and the TA to the repo. If you have concerns about your team mates' contributions, please contact me directly and I will try to address them.

Grading

Grading will be handled the same as Assignment 2 and 3: C quality work is implementing the features in a way that is mostly working, but may be buggy or not scalable. B quality work is implementing the features in a way that works but may have scaling issues, or lacks consideration for tuning and iterating. A quality work is implementing the features in robust, polished way that demonstrates consideration for tuning and scaling.

Make sure you meet the requirements before doing additional enhancements. And when considering enhancements, realize that improving the UI/networking robustness/gameplay/etc is generally a better place to spend your time than adding bells and whistles. If you end up showing this off to people later, you'd much rather they get involved in playing it than for you to have to look over their shoulder to show off your special effects while apologizing that you never actually got it to a playable state.


Last modified: 10/22/23 by Sarah Abraham theshark@cs.utexas.edu