Newer
Older
# FOSS Galaxy Game Library
A library for building FOSS Games, Educational Resources and Academic Experiments.
## Development Instructions
### Installing dependenecies
FGGL depends on a few dependencies to work correctly.
On Ubuntu:
```bash
sudo apt install build-essential cmake
sudo apt install -y libglm-dev libglfw3-dev libopenal-dev libspdlog-dev libfreetype-dev libyaml-cpp-dev libassimp-dev libbullet-dev
```
### Building
It's designed to be a fairly standard cmake project, so the standard cmake steps should work:
```bash
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
```
The library should also build the test scene (`demo`). There is a shellscript in the root of the
project that will build the project and run the demo project in gdb.
Most of the dependencies should be downloaded automatically. If you're on X don't use glfw from the
Fedora repos, it won't work (it's configured for Wayland). The version the project builds should work.
### Deploying
The library is designed to be used as a shared library, as it is licenced in the LGPL. You can generate the shared library, header files and assoicated cmake files using the following command:
```bash
cmake --install build --prefix /tmp/fggl-lib
```
This will place the files in /tmp/fggl-lib, you can adjust this to suit your needs.
You can then include the library in your application using cmake, eg:
```bash
find_package(spdlog REQUIRED)
target_link_libraries(game spdlog::spdlog)
find_package( fggl REQUIRED PATHS /tmp/fggl-lib )
target_link_libraries(game fggl::fggl)
```
### Flatpak Demo
This is still experimental, but the command used to test flatpak compatablity with the demo application is:
```
flatpak-builder builds/flatpak build-aux/com.fossgalaxy.fggl.demo.yml --force-clean --install --user
```
The following tools are helpful for development:
* Valgrind (see the ways in which memory is messed up)
* RenderDoc (see what's being sent to the GPU)
* GDB (see what caused the crash this time)
* An Editor/IDE (I'm using neovim with a bit of clion)