Dustbin::Games Framework
This is a little code snippet which allows easy creation of projects using the Irrlicht 3d engine. I have implemented it mainly for my own use, but want to give others the oportunity to use it was well (under the terms of the zlib license - https://www.zlib.net/zlib_license.html)
Overview
There are some points worth mentioning about the framework:
- The framework uses "modules". Each module is compiled into a library of it's own, and depending on which modules you chose to add to your project several of them are added to the project. Note that modules also have dependencies, so don't wonder that some are included which were not explicitly added
- A JSON file defining the project is used, and there is a Python (3) "Project Wizard" in the "Scripts/MakeCMakeWizard" subfolder which allows configuring your project
- If you create a project and add some apps they should compile and start without modifications
- There are some basic concepts used inside the framework
- There is a central class "CMainClass" which handles "Commands"
- All work done by the app must use "Commands"
- The main class provides a "Command Stack" where you can add several commands which run. The main idea is to separate code depending on it's functionality
- The commands may communicate using "messages". There is a script "generate_cpp.py" in "Scripts/Messages" which takes a JSON file as input and creates C++ code from the definitions
- There are "input" messages going down the command stack (i.e. the last command added receives none, the first command receives all), and "output" messages which go the other way
Requirements
For Windows (the only platform at the moment, but at least Linux is planned):
- Python3 must be installed (https://www.python.org/) with the platformdirs (py -m pip install platformdirs) package installed
- CMake must be installed (https://cmake.org/)
- VCPKG must be installed (https://vcpkg.io/en/)
- Irrlicht source code must be provided (https://irrlicht.sourceforge.io/), it will be added to the generated solution and compiled with the framework or an app using it
Irrlicht Tree Drag / Drop
If you want to use the Drag / Drop functionality for the treeview implemented by me you need to use the SVN patch provided in "scripts\IrrlichtPatch\IrrlichtTreeview.patch" with your Irrlicht checkout
VCPKG dependency installation
I prefer to use static linked libraries, so it's necessary to set the environment variable "VCPKG_DEFAULT_TRIPLET" to "x64-windows-static" to define the VCPKG default triplet
./vcpkg.exe install FreeType
./vcpkg.exe install sfml[audio]
./vcpkg.exe install lunasvg
./vcpkg.exe install ode
Prepare Python
py -m ensurepip --upgrade
py -m pip install --upgrade pip setuptools wheel