Setup the repos¶
Estimated time to read: 12 minutes
- Read about Privacy and FERPA compliance here
- This one, for in class coding assignments. https://github.com/InfiniBrains/Awesome-GameDev-Resources
- MoBaGEn, for interactive assignments. https://github.com/InfiniBrains/mobagen
- Install
CLion
(hasCMake
embedded) or see #development-tools - Install git and add the binaries to your PATH;
- Those repositories are updated constantly. Pay attention to syncing your repo frequently.
Types of coding assignments¶
There are two types of coding assignments:
- 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;
-
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.
- Create an account on github.com or any
git
hosting on your preference; -
Fork repos or duplicate the target repo on your account;
-
Add my user to your repo to it with
read
role. My userid istolstenko
(or your professor) on github, for other options, talk with me in class. Follow this; - 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:
- 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) - 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.
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¶
- Fork and clone the repos. Make it private if you can;
- Open
CLion
or yor preferredIDE
withCMake
support; - Open the
CMakeLists.txt
as project from the root of the repo; - 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:):
- Go to the executable drop down selection (top right, near the green
run
ordebug
button) and select the assignment you want to run. It will be something likeai-XXX
whereXXX
is the name of the assignment; - If you want to test your assignment against the automated inputs/outputs, select the
ai-XXX-test
build target. Here you should use thebuild
button, not therun
ordebug
button. It will run the tests and show the results in theConsole
tab;