Simple game engine in C++.
-
Clone repository and install engine dependencies.
git clone https://github.com/Bleskocvok/frog-engine.git cd frog-engine sh ./script/libraries.shFolder
gamecontains an example 3D game and foldergame2dcontains a sample of 2D game code.
-
The build might need additional system packages installed:
libgl1-mesa-dev,mesa-common-dev,libxrandr-dev,libxinerama-dev,libxcursor-devandlibxi-devshould cover it. These will be probably in your package manager's repository. -
It can be build by using the helper
buildscript.sh ./script/build -o bin-game -b Release gen-build game
-
Or by manually invoking
cmakecommands.cmake -S game -B bin-game cmake --build bin-game -j4
-
To run the compiled example, execute the
Gamebinary../bin-game/Game
-
It can be build by using the helper
buildscript.sh ./script/build -o bin-game2d -b Release gen-build game2d
-
Or by manually invoking
cmakecommands.cmake -S game2d -B bin-game2d cmake --build bin-game2d -j4
-
To run the compiled example, execute the
Gamebinary../bin-game2d/game_2d
-
./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.exeand./bin-lin/Gamethe resulting compiled game for Windows and Linux respectively -
./out/build/x64-Debug/Debug/Game.exethe resulting compiled game for Windows when compiled in Visual Studio
-
The engine is wrapped in the namespace
frogand 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.pngis 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 select the desired target (
Game.exeorgame_2d.exe)
-
Install necessary tools:
cmake,mingw64 -
In
PowerShell, enter the root folder of the project; If you perform thelscommand, you should see files such asCMakeLists.txt,README.md,engine/, ... -
Make sure the folder
bin-winis empty -
Call
script/build.bat -
Pray that it works; if not, return to step 1. and try to reconfigure the installation of
cmakeormingw -
If it worked, after it has finished you should be able to open
bin-win/Game.exe, which starts the game
Originally made as a project assignment.
Link to the original repository pa199-project
Life is pointless.
- Fixed floating type arithmetic functions (sin, cos, sqrt, …)
- Android build support
- Other smartphone support
- Net code support for multiplayer
- Refactor to use more namespaces
- Test fixed thoroughly
- Packaging android and linux support
- More fixed variants (uint-based, or int-based, overflow-safe)
- Unify 2d/3d interface
- Static dependency lib build