This is the programming challenge of the lecture 'Object-Oriented Programming in C++'.
Program the behavior of Robots to make them collect resources, build new units and fight fierce viruses to survive. As Robots are technical machines, they have certain limitations:
- They do not know their own position and can only locate themselves using distance measurements to satellites flying over the game board.
- They do not know where to find resources, so they have to walk around and scan their close proximity for them.
- No code modifications outside of the folder
TEAMNAME
are allowed (except insideGameState.cpp
in order to rename theTEAMNAME
folder) - Win conditions
- Collect all resources on the game board (in multiplayer mode the player with the most resources wins)
- Destroy your opponents units and headquarters in multiplayer mode
- Do not loose your headquarters and/or all units
- Command-line (Windows users need to install Git)
git clone --recurse-submodules https://github.com/UniStuttgart-INS/OOP-RobotNavigationChallenge.git
- When downloading the Zip (instead of using command-line), make sure to manually download the libraries in the
lib
folder.
conan install . --build=missing -s build_type=Release
# Linux
cmake -Bbuild/Release -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="build/Release/generators/conan_toolchain.cmake"
# Windows
cmake -Bbuild/Release -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="build/generators/conan_toolchain.cmake"
cmake --build build/Release --config Release --parallel8
./build/bin/oop-robot-navigation-challenge
Most library dependencies are managed by Conan.io, so you just need to install the basics.
sudo pacman -S base-devel cmake clang glfw-x11
yay -S conan # AUR package
conan profile detect --force
sudo apt update
sudo apt upgrade -y
sudo apt install -y build-essential clang cmake python3-pip libglfw3-dev libglfw3
pip3 install conan --user
conan profile detect --force
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew update
brew install cmake llvm conan glfw3
ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"
ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
conan profile detect --force
- From the Visual Studio Downloads page, scroll down until you see Tools for Visual Studio 2022 under the All Downloads section and select the download for Build Tools for Visual Studio 2022. Check the 'Desktop development with C++' workload and check the following
- MSVC Buildtools
- Windows SDK
- C++-CMake-Tools for Windows
- Install Conan
- Needed:
- Optional:
- Conan A distributed, open source, C/C++ package manager
- Libraries (Install yourself and change cmake link targets or let them automatically be installed by Conan):
- GUI:
- Dear ImGui Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies
- ImPlot An immediate mode, GPU accelerated plotting library for Dear ImGui.