Menu ▾ ▴

Tree [f2b2c1] master /
 History

HTTPS access


File Date Author Commit
 _source 6 days ago brainsaw brainsaw [539a44] Add a test app to get a list of available fonts...
 data 6 days ago brainsaw brainsaw [539a44] Add a test app to get a list of available fonts...
 doc 2026-11-21 Christian Keimel Christian Keimel [17daab] Updated the script so the the "Create Release" ...
 license 2026-11-15 Christian Keimel Christian Keimel [805c99] Add the release scripts to copy license files a...
 scripts 6 days ago Christian Keimel Christian Keimel [f2b2c1] Adjust the CreateProjectFiles.py script to comp...
 .gitignore 2026-11-18 Christian Keimel Christian Keimel [eec1ce] Finished the project management script and adde...
 CMakeSettings.json 2026-08-12 Christian Keimel Christian Keimel [e48252] An intermediate checkin for the complete overha...
 license.txt 2026-11-15 Christian Keimel Christian Keimel [d5a9d0] Add license file for the framework itself
 readme.md 6 days ago brainsaw brainsaw [4c3a4b] Got framework working on a Raspberry Pi 5

Read Me

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 modular libraries ("modules"). Each module in _source/modules/ is compiled into a library of its own, and depending on which modules you choose to add to your project applications, their transitive dependencies, libraries, and data assets are automatically resolved and added.
  • A unified JSON file defines the project configuration, applications, messages, interfaces, and release packaging.
  • Graphical project management is provided by scripts/ProjectManagement.py (combining Project Wizard, Message Wizard, Settings, and Release Wizard).
  • Headless command-line build generation is provided by scripts/CreateProjectFiles.py <project.json>.
  • If you create a project and add applications, they compile and run out of the box with default skeleton files.
  • Core architectural concepts:
  • Central coordinator class CMainClass managing startup, Irrlicht integration, and the execution loop.
  • Central service locator IDataHub providing shared access to device, video driver, scene manager, GUI, audio, font, l10n, and virtual file systems.
  • Bidirectional Command Stack architecture (ICommandStack) routing downward Input and upward Output messages between decoupled commands with stack-stashing support.
  • Automated C++ code generator creating typed message classes, message factories, command interfaces, and stack proxies directly from JSON definitions.
  • Complete interactive documentation, architectural walkthroughs, and case studies are available in doc/index.html.

Framework Modules (42 Modules)

The framework includes 42 modular libraries located in _source/modules/:

  • Core & System (8 modules):
  • core_mainclass: Application entry-point coordinator (CMainClass) and main loop runner.
  • core_datahub: Central service locator (IDataHub) for engine subsystems, persistent settings, globals, application metadata, and active data archive registration.
  • core_commandstack: Bidirectional command stack (ICommandStack, ICommand, CCommandProxy) with input/output message propagation and stack stashing.
  • core_messages: Foundational messaging interfaces (IMessage, IMessageFactory, IMessageProxyFilter).
  • core_threads: Threading primitives (IThread) with thread-safe input/output message queues.
  • core_log: Lightweight global logging facility (dustbin::log(...)).
  • system_platform: Cross-platform operating system abstractions (data paths, font directories, drive enumeration, date formatting).
  • system_datafile: Virtual file system archive loader that automatically mounts the release data ZIP archive (_DATAFILE) into Irrlicht at startup.
  • Rendering & 3D Scene (9 modules):
  • render_default: Standard Irrlicht fixed-function forward scene renderer.
  • render_dustbinshader: Custom programmable GLSL/HLSL shader renderer supporting normal mapping and custom lighting models.
  • render_aishader: AI-assisted shader pipeline.
  • scene_skybox: Panoramic and cubic skybox scene nodes.
  • scene_cameracontrol: Configurable first-person, orbital, and flight camera scene animators.
  • scene_nodedata: Custom per-node metadata attachment and serialization.
  • scene_animators: Procedural texture and UV animators.
  • scene_audionodes: 3D positional audio emitter scene nodes.
  • scene_unknown: Fallback placeholder scene nodes for missing mesh or texture assets during editing.
  • Physics & Audio (5 modules):
  • physics_interfaces: Abstract physics engine interfaces (IPhysicsWorld, IPhysicsBody).
  • physics_ode: Open Dynamics Engine (ODE) 3D rigid-body simulation implementation.
  • audio_interfaces: Abstract audio device interfaces (IAudioInterface).
  • audio_3dsound: 3D positional audio manager with listener tracking.
  • audio_sfml: SFML Audio backend implementation for 2D/3D sound playback and streaming music.
  • GUI, Fonts, Input & Localization (7 modules):
  • gui_dustbingui: Extended Irrlicht GUI controls (docking panels, custom buttons, tab containers, anchor tabs).
  • font_interfaces: Abstract font rendering and glyph cache interfaces.
  • font_freetype: FreeType 2 vector font rasterizer with high-DPI scaling.
  • localize_interfaces: Abstract internationalization and localization interfaces.
  • localize_dustbinl10n: XML-based translation dictionary and localized string formatting.
  • controller_dustbincontroller: Gamepad, joystick, keyboard, and mouse input mapping.
  • event_eventhandlers: Pluggable Irrlicht IEventReceiver event routing and dispatching.
  • Networking & Serialization (6 modules):
  • network_enet: Reliable UDP client/server networking backend powered by ENet.
  • network_discovery: Local network UDP broadcast peer discovery.
  • serializer_interfaces: Abstract data serialization interfaces (ISerializer).
  • serializer_bin: Compact binary serializer for network packets and save states.
  • serializer_xml: Human-readable XML serializer for configuration and level definitions.
  • data_serializerbin: Binary serialization helper wrapper.
  • Editors & Helpers (7 modules):
  • commands_guieditor: 2D GUI layout editor command suite.
  • commands_sceneeditor: Interactive 3D scene editor command suite with gizmos, scene tree, and attribute inspection.
  • editor_commands: Shared editor command infrastructure and base tools.
  • editor_general: Common editor layout dialogs and assets.
  • editor_undoredo: Multi-level undo/redo action history stack.
  • helpers_dustbinhelpers: Core utilities (string conversions, UUIDs, Bezier math, data helpers).
  • helpers_random: Fast pseudo-random number generators and distribution helpers.

Project Management & Build Tools

The scripts/ directory provides comprehensive tooling for framework projects:

  • scripts/ProjectManagement.py (GUI):
  • Global Environment Paths: Configure paths to DustbinFramework, VCPKG, Irrlicht, Release Backup, and Target Platform ("Windows x64", "Linux x64", "Linux arm64").
  • Project Settings: Project name, company, base folder, CMake folder, build folder, and major/minor versioning.
  • Project Wizard: Manage applications, configure source/header directories, select modules, inspect transitive dependencies, and define SettingsName (_SETTINGSNAME).
  • Message Wizard: Define multiple message sets, data fields, and command interfaces; generate C++ message headers/sources, factories, and proxies.
  • Release Wizard: Scan build and data directories, manage release items (Add App / Del App), optionally compress data into a single ZIP archive (_DATAFILE), copy licenses and release files (Copy Files Now), and archive releases into <Project>.zip and versioned backups in the global Release Backup folder (Create Release).
  • ⚡ Generate: Runs the complete end-to-end pipeline (Messages → CMakeLists → CMake → Visual Studio project adjustments).
  • scripts/CreateProjectFiles.py (CLI):
  • Command-line tool executing the same full generation pipeline headless for CI/CD and script automation.

Requirements

Supported platforms are Windows (x64) and Linux (x64 and arm64):

  • Python 3 (https://www.python.org/) with the platformdirs package (and tkinter for ProjectManagement.py)
  • CMake (https://cmake.org/) — version 4.0.0+ on Windows, 3.20.0+ on Linux
  • VCPKG (https://vcpkg.io/en/) for third-party C++ libraries
  • Irrlicht source code (https://irrlicht.sourceforge.io/), which is compiled together with the framework and applications (on Linux arm64 / Raspberry Pi, use the Irrlicht ogl-es branch for OpenGL ES 2 support)

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 (Windows)

On Windows, statically linked libraries are used, so set the environment variable VCPKG_DEFAULT_TRIPLET to x64-windows-static before installing:

./vcpkg.exe install freetype
./vcpkg.exe install sfml[core,audio]
./vcpkg.exe install lunasvg
./vcpkg.exe install ode
./vcpkg.exe install enet

Prepare Linux

On Debian- or Ubuntu-based distributions (e.g. Ubuntu, Debian, Linux Mint, or Raspberry Pi OS), install the build toolchain, system graphics/X11 headers, and Python GUI packages through apt-get, and install the C++ framework libraries through VCPKG.

Why VCPKG on Linux? The framework uses SFML 3.x (SFML::Audio, SFML::System) and vcpkg CMake config packages (ODE::ODE, unofficial::enet::enet, lunasvg). System APT repositories often ship SFML 2.x (incompatible API) and omit CMake config files for ODE/ENet and LunaSVG.

1. Build Tools, Irrlicht Prerequisites, VCPKG Tools & Python GUI (APT)

Install the common toolchain, VCPKG build prerequisites, X11 headers, and Python packages:

sudo apt-get update
sudo apt-get install build-essential cmake ninja-build git curl zip unzip tar pkg-config \
  autoconf automake libtool bison flex libx11-dev libxxf86vm-dev libxcursor-dev \
  python3-tk python3-platformdirs

Install the graphics development headers for your target architecture:

  • Linux x64 (Desktop OpenGL):
    bash sudo apt-get install libgl1-mesa-dev libxrandr-dev libxi-dev
  • Linux arm64 / Raspberry Pi (OpenGL ES 2 + EGL):
    bash sudo apt-get install libgles-dev libegl-dev

2. Install VCPKG & Framework Libraries

Clone and bootstrap VCPKG (for example in ~/vcpkg) and install the required libraries:

git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
~/vcpkg/bootstrap-vcpkg.sh -disableMetrics
~/vcpkg/vcpkg install freetype "sfml[core,audio]" lunasvg ode enet

VCPKG automatically uses the host triplet (x64-linux on x86_64 or arm64-linux on aarch64), matching the triplet passed by ProjectManagement.py / CreateProjectFiles.py:

  • FreeType (freetype): FreeType 2 for the font_freetype module (Freetype::Freetype).
  • SFML Audio (sfml[core,audio]): SFML 3.x Audio & System for the audio_sfml module (SFML::Audio, SFML::System) without pulling in unnecessary graphics/window/network dependencies.
  • LunaSVG (lunasvg): Standalone SVG rasterization library.
  • ODE (ode): Open Dynamics Engine for the physics_ode module (ODE::ODE).
  • ENet (enet): Reliable UDP networking library for network_enet and network_discovery (unofficial::enet::enet).

3. Configure & Build on Linux

  1. Launch the GUI project manager (or use the CLI generator):
    bash python3 scripts/ProjectManagement.py
  2. Set the global environment paths:
  3. DustbinFramework: path to your DustbinFramework checkout
  4. VCPKG: ~/vcpkg
  5. Irrlicht: path to your Irrlicht source checkout
  6. Target Platform: Linux x64 or Linux arm64
  7. Load a project JSON (e.g. scripts/projects/dustbineditors.json) and click Generate, or run headless via:
    bash python3 scripts/CreateProjectFiles.py scripts/projects/dustbineditors.json
  8. Compile the generated build directory:
    bash cmake --build <build_folder> -j$(nproc)

Prepare Python

The Python project management and build scripts require Python 3 with the platformdirs package (and tkinter for the GUI):

  • Windows:
    powershell py -m ensurepip --upgrade py -m pip install --upgrade pip setuptools wheel py -m pip install platformdirs
  • Linux (Debian/Ubuntu/Raspberry Pi OS):
    bash sudo apt-get install python3-platformdirs python3-tk
    (Or install platformdirs in a virtual environment with python3 -m pip install platformdirs.)

Required Python Modules

  • platformdirs (external module): Used to resolve cross-platform user data and configuration directories.
  • Python Standard Library modules (bundled with Python):
  • tkinter / ttk / filedialog / messagebox: Powers the GUI in ProjectManagement.py (included by default in the official Windows Python installer; provided by python3-tk on Debian/Ubuntu).
  • zipfile: Packaging releases and data files.
  • json, os, sys, shutil, subprocess, platform, threading, pathlib, typing, copy: Core utilities, process management, and file handling.