Skip to content

Setup the repos

Estimated time to read: 12 minutes

  1. Read about Privacy and FERPA compliance here
  2. This one, for in class coding assignments. https://github.com/InfiniBrains/Awesome-GameDev-Resources
  3. MoBaGEn, for interactive assignments. https://github.com/InfiniBrains/mobagen
  4. Install CLion (has CMake embedded) or see #development-tools
  5. Install git and add the binaries to your PATH;
  6. Those repositories are updated constantly. Pay attention to syncing your repo frequently.

Types of coding assignments

There are two types of coding assignments:

  1. Formal: Automatic grading system with automated tests. Some tests might not be fully working for you, talk with me if it doesnt work for you. Or just submit the code on canvas and I will grade it manually. Those should solved using C++ ; It is done following this repo;
  2. Interactive: For the interactive assignments you can choose whatever Game Engine you like, but I recommend you to use the framework I created for you: MoBaGEn. If you use a Game Engine or custom solution for that, you will have to create all debug interfaces to showcase and debug AI which includes, but it is not limited to:

    • Draw vectors to show forces applied by the AI;
    • Menus to change AI parameters;

Danger

Under no circunstaces, you should make your algorithm solutions public. Be aware that I spend so much time creating them and it is hard to me to always create new assignments.

Code assignments

Warning

If you are a enrolled in a class that uses this material, you SHOULD use the institutional and internal git server to be FERPA compliant. If you want to use part of this assignments to build your portfolio I recommend you to use github and make only the webgl build public. If you are just worried about privacy concerns, you can use a private repo on github.

  1. Create an account on github.com or any git hosting on your preference;
  2. Fork repos or duplicate the target repo on your account;

    1. If you want to make it count as part of your portfolio, fork the repo follow this;
    2. If you want to keep it private or be FERPA compliant, duplicate the repo following this.
  3. Add my user to your repo to it with read role. My userid is tolstenko(or your professor) on github, for other options, talk with me in class. Follow this;

  4. Send me a message on canvas with the link to your repo;

Private repo

GitHub doesnt allow private fork of a public repo. If you want to receive my updates into your private repo you can do in 2 different ways:

  1. Create an empty repo. Clone it to your machine. In your GitKraken or any other git tool, add my repo as another origin. Merge from from mine to yours with flag --allow-unrelated-histories (search it)
  2. Create an empty repo and clone it to your machine. From time to time, download the files from my repo and replace the ones I might have updated/fixed.

Recordings

In all interactive assignments, you will have to record a 5 minute video explaining your code. Use OBS or any software you prefer to record your screen while you explain your code. But for this one, just send me the video showing the repo and the repo invites sent to me.

Development tools

I will be using CMake for the classes, but you can use whatever you want. Please read this to understand the C++ toolset.

In this class, I am going to use CLion as the IDE, because it has nice support for CMake and automated tests.

  • Download it here.
  • If you are a student, you can get a free license here.

If you want to use Visual Studio :simple-visualstudio:, be assured that you have the C++ Desktop Development workload installed, more info this. And then go to Individual Components and install CMake Tools for Windows .

Note

If you use Visual Studio :simple-visualstudio:, you won't be able to use the automated testing system that comes with the assignments.

[OPINION]: If you want to use a lightweight environment, don't use VS Code for C++ development. Period. It is not a good IDE for that. It is preferred to code via sublime, notepad, vim, or any other text editor and then compile your code via terminal, and debug via gdb, than using VS Code for C++ development.

Opening the Repos

  1. Fork and clone the repos. Make it private if you can;
  2. Open CLion or yor preferred IDE with CMake support;
  3. Open the CMakeLists.txt as project from the root of the repo;
  4. Wait for the setup to finish (it will download the dependencies automatically, such as SDL);

For the interactive assignments, use this repo and the assignments are located in the examples folder.

For the algorithmic assignments, use this repo and the assignments are located in the docs/artificialintelligence/assignments folder. I created some automated tests to help you debug your code and ensure 100% of correctness. To run them, follow the steps (only available though CLion or terminal, not Visual Studio :simple-visualstudio:):

  1. Go to the executable drop down selection (top right, near the green run or debug button) and select the assignment you want to run. It will be something like ai-XXX where XXX is the name of the assignment;
  2. If you want to test your assignment against the automated inputs/outputs, select the ai-XXX-test build target. Here you should use the build button, not the run or debug button. It will run the tests and show the results in the Console tab;