DG - Domini Games test task
This project is a small game engine developed using SDL and OpenGL. It features basic movement controls with the WASD keys, allowing players to navigate the environment. The left shift key enables sprinting for faster movement. The left, right move light source along x axis, up, bottom - along y and z, x along z axis. The camera can be rotated using the mouse, providing an immersive experience. Additionally, the engine includes a lighting system, though it may have some inaccuracies. Overall, this test assignment showcases fundamental game mechanics and graphics rendering capabilities.
install dependencies:
pacman -S cmake mesa ninja clangNOTE: you need C++ compiler which support C++20
from root project folder:
cmake -S orbi/ -B build -G Ninja
ninja -C build/additional options: -DDG_ENGINE_TEST=ON/OFF, -DDG_ENGINE_SANITIZER=ON/OFF, -DDG_ORBI_SANITIZER=ON/OFF, -DDG_ENGINE_PEDANTIC=ON/OFF, -DDG_ORBI_PEDANTIC=ON/OFF
run with:
./build/orbimove to android-project:
cd orbi/android-projectfirstly you need to install NDK. I recommend to install cmdline-tools and gradle will do the rest for us. Here is official documentation
Also add local.properties file in android-project with path to android-sdk.
Something like that for my pc.
sdk.dir=/home/missed/code/dg/orbi/android-project/android-sdkCarefully read and accept licenses..
Or just yes | ./android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses if you dont like all this lawyer nonsense.
After connect your phone and just run:
./gradlew installDebugIsn't tested, but also should work with minor fixes. How to configure environment on I will leave to Windows lovers :)
UPD: ok, I test this)
cross-build with:
cmake -S orbi/ -B build-win -G Ninja -DCMAKE_TOOLCHAIN_FILE=(realpath cmake/cmake-toolchain-mingw64-x86_64.cmake) -DDG_ENGINE_SANITIZER=OFF -DDG_ORBI_SANITIZER=OFF
ninja -C build-win/Unfortunately wine a little drunk and it refuse all my tries to launch this... But all should work on real Windows
If you feel the power, try:
WINEPATH="/usr/x86_64-w64-mingw32/bin/;$(pwd)/build-win/_deps/sdl3-build/;$(pwd)/build-win/engine" ./build-win/orbi.exeor call wine manually, if your haven't properly configured xdg-open
ambient and diffuse lightning implemented, but works with glitches inorbidue to incorrect loading of normals from .obj file- memory leak
on my machine this is always 3730 bytes. It reproduces even on simple example withSDL_InitandSDL_Quit. So, maybe SDL just leave memory unfreed, because app althrough will exit. On other SDL backend behaviour may differ.