This repo belongs to Game Guild Networking Course. If you use this repo, consider yourself under the Academic Honesty. Read both throughly. If you have any questions, bug fix, or improvement proposal, raise an issue. Especially if you have found someone misusing the repo, we will file a DMCA takedown. Read the LICENSE if you are in doubt.
WARNING: IF YOU ARE A STUDENT IN THE CLASS, DO NOT DIRECTLY FORK THIS REPO. DO NOT PUSH PROJECT SOLUTIONS PUBLICLY. THIS IS AN ACADEMIC INTEGRITY VIOLATION AND CAN LEAD TO GETTING YOUR DEGREE REVOKED, EVEN AFTER YOU GRADUATE.
WARNING: IF YOU ARE A STUDENT OUTSIDE CHAMPLAIN, DO NOT MAKE YOUR SOLUTION PUBLICLY AVAILABLE, AND DO SUBMIT YOUR OWN WORK. OTHERWISE, YOU WILL BE BANNED FROM GAMEGUILD AND REPORTED ON GITHUB Thank you for creating a fair learning environment.
You are allowed to fork this repo in cases you want to contribute to it, or if you are an instructor wanting to use it for your own class.
The following instructions are adapted from the GitHub documentation on duplicating a repository. The procedure below walks you through creating a private network repository that you can use for development.
Alternativelly, you may want to follow this process on any GOOD GIT-GUI tools. Such as git-fork, SmartGit, or GitKraken.
- Create a new repository under your account. Pick a name (e.g.
network-private) and select Private for the repository visibility level. - On your development machine, create a bare clone of the public network repository:
$ git clone --bare https://github.com/gameguild-gg/network.git network-public - Next, mirror the public network repository to your own private network repository. Suppose your GitHub name is
studentand your repository name isnetwork-private. The procedure for mirroring the repository is then:This copies everything in the public network repository to your own private repository. You can now delete your local clone of the public repository:$ cd network-public # If you pull / push over HTTPS $ git push https://github.com/student/network-private.git main # If you pull / push over SSH $ git push git@github.com:student/network-private.git main
$ cd .. $ rm -rf network-public
- Clone your private repository to your development machine:
# If you pull / push over HTTPS $ git clone https://github.com/student/network-private.git # If you pull / push over SSH $ git clone git@github.com:student/network-private.git
- Add the public network repository as a second remote. This allows you to retrieve changes from the gameguild-gg repository and merge them with your solution throughout the semester:
You can verify that the remote was added with the following command:
$ git remote add public https://github.com/gameguild-gg/network.git$ git remote -v origin https://github.com/student/network-private.git (fetch) origin https://github.com/student/network-private.git (push) public https://github.com/gameguild-gg/network.git (fetch) public https://github.com/gameguild-gg/network.git (push)
- You can now pull in changes from the public network repository as needed with:
$ git pull public main - Enable GitHub Actions from the project settings of your private repository on github.com;
Settings > Actions > General > Actions permissions > Allow All actions and reusable workflows Settings > Actions > General > Workflow permissions > Read and write permissions - Add your itstructor username as a collaborator to your private repository so they can view your code and help you debug issues.
Settings > Collaborators and teams > Manage access > Add people
We recommend developing networking on Ubuntu 24.04, macOS (M1/M2/Intel) or Windows (strictly through CLion). We do not support any other environments (i.e., do not open issues or come to office hours to debug them). We do not support WSL. The grading environment runs
Ubuntu 24.04.
Open the CMakeLists.txt file in CLion, and it should automatically configure the project for you. If you have any issues, please refer to the CLion documentation.
Make sure you have the following dependencies installed:
- CMake 3.20 or higher;
- A C++17 compatible compiler (GCC 9 or higher, Clang 10 or higher, or MSVC 2019 or higher);
- Git;
- Ninja (optional, but recommended for faster builds).
Then run the following commands to build the system:
$ mkdir build
$ cd build
$ cmake ..
$ makeIf you want to compile the system in debug mode, pass in the following flag to cmake: Debug mode:
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ make -j`nproc`This enables AddressSanitizer by default.
If you want to use other sanitizers,
$ cmake -DCMAKE_BUILD_TYPE=Debug -DBUSTUB_SANITIZER=thread ..
$ make -j`nproc`There are some differences between macOS and Linux (i.e., mutex behavior) that might cause test cases to produce different results in different platforms. We recommend students to use a Linux VM for running test cases and reproducing errors whenever possible.
You may want to use any IDE of your choice, but I will be using JetBrains IDEs for this course, so it will be easier to follow along if you do the same. VS Code is also a good choice, but I will not be providing specific instructions for it, besides that, the contextual autocomplete and other features in JetBrains IDEs are generally better.
- (Optional) Apply for Jetbrains Student License. A student license gives you free access to all JetBrains IDEs;
- Install Jetbrains Toolbox;
- Login to Jetbrains Toolbox using your student account;
- Once you log in, you will have access to all JetBrains IDEs for free as long as you are a student.
- Install the following tools via Jetbrains Toolbox, they are free for students and non-commercial use
- CLion. This will be extensively used for assignments involving C/C++ programming.
::: warning "Disable AI Assistance"
Please disable AI assistance features (like GitHub Copilot, ChatGPT plugins, etc.) in any IDE you use for this course. Relying on AI tools can hinder your learning process and may lead to academic integrity issues. Read more about our Academic Honesty.
On JetBrains IDEs, you can disable:
- AI assistance by going to
Settings/Preferences>Pluginsand disabling any AI-related plugins, such asGitHub Copilot,Trae AI,- or any other similar plugins you may have installed.
- In WebStorm, you can also disable AI code completion by going to
Settings/Preferences>Editor>General>Inline Completionand unchecking the option for AI-based suggestions: such asEnable local Full Line completion Sugestions,Enable automatic completion on typingEnable multi-line suggestions.
:::
- Each assignment is in its own folder named
assignment-<number>, e.g.,assignment-1,assignment-2, etc. - Each assignment folder contains:
README.md: Instructions for the assignment;docker-compose.yml: Docker Compose file to set up the required environment;- Other files and folders as needed for the assignment, refer to the
README.mdin each assignment folder for details.
.github/workflows/: Contains GitHub Actions workflows for automated testing of assignments. Do not modify these files..gitignore: Specifies files and folders to be ignored by Git. You may modify this file if needed.scripts/: Contains helper scripts for running tests and other tasks. Do not modify these files.reports/: Will contain any generated files or outputs from assignments. Do not modify these files.
- Each assignment includes automated tests that you can run locally using Docker.
- You may want to check the tab "Actions" on GitHub to see the results of automated tests run on your submissions.
- You may want to use
actto run GitHub Actions workflows locally. Refer to act documentation.
