__ __ _ _ _ _____ _ _ __ _____
\ \ / / | | (_) | | | __ \| | | | / _| /\ |_ _|
\ \ / /__ _ __| |_ _ ___ __ _| | | |__) | | __ _| |_| |_ ___ _ __ _ __ ___ ___ _ __ / \ | |
\ \/ / _ \ '__| __| |/ __/ _` | | | ___/| |/ _` | __| _/ _ \| '__| '_ ` _ \ / _ \ '__| / /\ \ | |
\ / __/ | | |_| | (_| (_| | | | | | | (_| | |_| || (_) | | | | | | | | __/ | / ____ \ _| |_
\/ \___|_| \__|_|\___\__,_|_| |_| |_|\__,_|\__|_| \___/|_| |_| |_| |_|\___|_| /_/ \_\_____|
Made by: WiSie98 https://github.com/WiSie98
and THEGRANDNICK https://github.com/THEGRANDNICK
This vertical platformer ai includes a doodle jump like game with an ai which uses a neural network with a genetic algorithm which was created with the RayLib library.
This project was created as part of an exam during our studies to learn the basics of machine learning.
We used the raylib-minimal template which was provided by https://github.com/chfhhd
and used the https://github.com/nlohmann/json
parser to parse the levels form the json format into c++.
The spritesheets where made by the user chipmunk
from https://opengameart.org/content/metroid-like
.
You need to download or clone this repository into your prefered IDE. The raylib library will be downloaded automatically by CMake. To start the project you need to select the main.cpp
as the start element, which is located under src
.
- Use the
space bar
to skip a generation. - To display the collision boxes press
1
. - To visualize the detection box of the ai actors press
2
.
If you want to play the game as a playable charachter, go to header.h
under src/core/headerfiles
and change STARTASPLAYER
to true.
constexpr bool STARTASPLAYER = true;
- The player character can be controlled with the
WAS
orArrow keys
. - You can jump with
W
orArrow Up
and move left and right withA
orArrow Left
andD
orArrow Right
.
Some other useful setting can be found in header.h
which is located under src/core/headerfiles
.
Which raylib version is used can be specified in the cmake/raylib.cmake
file. If this is changed after CMake has already created the project once, you must use CMake to completely rebuild the project.
see LICENCE
file for details.