Simple game engine in C++. Originally made as a project assignment.
Link to the original repository pa199-project
[[TOC]]
-
./engine/
the whole engine -
./engine/src/
the engine source files -
./engine/tests/
tests for linear algebra calculations -
./engine/docs/
generated documentation using Doxygen, see./engine/docs/html/index.html
-
./engine/libraries/
contains a folder for each additional library used by the engineGLFW/
(https://www.glfw.org/)glad/
(https://glad.dav1d.de/)stb_image/
(https://github.com/nothings/stb/blob/master/stb_image.h)tiny_obj_loader/
(https://github.com/tinyobjloader/tinyobjloader)doctest/
(https://github.com/doctest/doctest)
./engine/assets/
the engine assets such as shaders and font atlas
-
./src/
source files of the game -
./game_assets/
textures used in the game -
./bin-win/Game.exe
and./bin-lin/Game
the resulting compiled game for Windows and Linux respectively -
./out/build/x64-Debug/Debug/Game.exe
the resulting compiled game for Windows when compiled in Visual Studio
-
The engine is wrapped in the namespace
frog
and individual components are separated into nested namespaces:frog
- core engine partfrog::geo
- geometry & maths: matrix, vector, etc.frog::gl
- graphics stuff: rendering, mesh, mesh generationfrog::os
- system stuff: window creation, events handling
-
Font in
./engine/assets/font.png
is based off of my own font from this repository -
The architecture used for the engine is inspired by Unity:
- the engine follows this structure:
engine
->scene_manager
->scene
->game_object
->script
- the engine follows this structure:
-
It should just work in VS 2019 (the C++ VS components need to be installed in VS Installer)
-
Make sure to launch the target
Game.exe
-
Install necessary tools:
cmake
,mingw64
-
In
PowerShell
, enter the root folder of the project; If you perform thels
command, you should see files such asCMakeLists.txt
,README.md
,engine/
, ... -
Make sure the folder
bin-win
is empty -
Call
script/build.bat
-
Pray that it works; if not, return to step 1. and try to reconfigure the installation of
cmake
ormingw
-
If it worked, after it has finished you should be able to open
bin-win/Game.exe
, which starts the game
-
Install
cmake
andgcc
/clang
-
Install these packages and hope that it covers all necessary dependencies:
sudo apt install libgl1-mesa-dev
sudo apt install mesa-common-dev
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
-
In
shell
enter the root folder of the project; If you perform thels
command, you should see files such asCMakeLists.txt
,README.md
,engine/
, ... -
Call
script/build.sh
-
After it has finished you should be able to execute
bin-lin/Game
, which starts the game