Welcome To The Blade Developer Resource
Blade: The Game Engine is a light weight library to simplify creating games
(and applications) by providing a simple API, taking care of mundane
boiler-plate code and abstracting platform differences. Why create another
library when there are many other game libraries that do the same thing?
Those libraries are...
Very large, 100MB's in size or larger.
Blade is less than 5MB.
Built on old programming conventions.
Blade aims to use the latest language advances (where it makes sense).
Maintain a lot of legacy code.
Blade targets the latest platfroms to reduce code-bloat.
Why should you not use Blade: The Game Engine? The main reason is the constantly changing API. A core component of Blade may be stable for a long time, then a better way of implementing that component is found resulting in a new API and better performance or less memory usage or both.
How To Get Blade
The Blade: The Game Engine can be downloaded as source code from the Download page.
Blade: The Game Engine uses Fossil for its source code control system. Why use Fossil? Using Fossil allows you to access the newest source code available as well experimental features and bug fixes before those changes are added to the latest release. It is similar to "git", just easier to use.
To use Fossil to clone the Blade: The Game Engine repository:
fossil clone https://blade.zakero.com Blade.fossil
Then place Blade.fossil with your other fossil repositories (such as "/home/$USER/fossil/" on Linux).
mv Blade.fossil /home/$USER/fossil/
Next, create a directory/folder that will be used to open the Blade fossil
repository ("/home/$USER/Project/Blade" for example) and
mkdir -p /home/$USER/Project/Blade cd /home/$USER/Project/Blade
Open the repository:
fossil open /home/fossil/Blade.fossil
And finally checkout the latest release version:
fossil checkout release
Or checkout the latest source code:
fossil checkout master
Optionally, you run interact with Blade using Fossil's web interface. Why would you want to do this? The short answer is that by doing so, you will practically have a version of this website running locally.
fossil server /path/to/Blade.fossil
This command will open a port, tell you the port number it is using, so that you can then use your web browser to access it with the URL:
If you don't want a random port and would rather a specific port number. For Example:
fossil server --port 9876 /path/to/Blade.fossil
The URL for this example would be:
If you intend to build Blade: The Game Engine, you will need the following:
- A C++20 compatible compiler
- Doxygen and Graphviz(dot) are needed for the documentation
- [Linux] Bash is needed by the shell scripts
- [Optional] Qt5 developement environment (libraries/headers) are needed to build the Qt5 backend
Building Blade: The Game Engine from the Linux command-line can be very easy.
If you are working on the Blade: The Game Engine source code and you are
using Bash (or a compatible shell), it is recommended that you use the
./bin/build script. The
./bin/build script has many useful features such
- Specifing the CMake build target (--target)
- Monitoring source code changes and automatically recompile the library
--help option will provide all the usage information:
However, if you just want to build a specific version of Blade: The Game
Engine, you can still use the
./bin/build script or use CMake directly.
CMake's recommended dance to build a project works from Blade's top-level
cmake -S . -B build cmake --build build
Or add a few more steps in the dance to get:
CXX=some_cpp_compiler cmake -S . -B build cmake --build build -j `nproc`
Blade: The Game Engine supports many compile time configuration settings. These can be access by using CMake's regenerate tool:
While a very brief description of the settings is available in
refer to the Blade Defines page for a full description.
To use Blade: The Game Engine in your projects, the Blade library and support libraries will need to be in your linker path. And of course the Blade header files will need to be added to your compiler's include path.
The C++ API documentation is available:
This link points to the latest release of the Blade API documentation
- Source Code
If you have a copy of the source code, point your web browser to the file "dox/blade/html/index.html"
Are you using fossil to view the repository or even this page? Maybe something like fossil ui from the checkout directory? If so, then the C++ API is what you want.
Interested in looking at how Blade: The Game Engine is structured? Or maybe even modifying the code? The following sections will help in that endeavor.
All the Blade related C++ code is located in directories that start with the "blade" prefix. Blade relies on support libraries that server as an abstraction layer to operating system resources. The directory names for those libraries follow this pattern:
For example, blade_linux_wayland is an abstraction layer between Blade and the Wayland window manager.
Below is an over-view of the directories and their purpose.
|bin||Blade developer scripts for the project.|
|blade||The Blade library C++ source code.|
|blade_linux_qt5||The C++ source code for the Blade Qt5 support library.|
|blade_linux_wayland||The C++ source code for the Blade Wayland support library.|
|blade_linux_xcb||The C++ source code for the Blade XCB support library.|
|cmake||CMake support scripts.|
|dox||The Blade project documentation.|
|test||C++ test programs.|
|tool||Tools for projects that want to use Blade.|
|wiki||Static pages for the website to use Blade.|
How To Build
The build process is based on CMake. If you are using an IDE, you should be able to import the CMakeLists.txt into your environment. To build from the command-line, use CMake's process of:
cmake -S . -B build-dir-name
Replace bulid-dir-name with the name of your build directory. Using a directory name prefix of "build" is recommended because fossil is configured to ignore them.
Optionally, the build can be configured by going into the build directory and
using the CMake configuration tool:
cd build-dir-name ccmake .
And finally, building the project can be done with
cmake --build build-dir-name
|Recent Changes||-||Changes since the latest release|
|Roadmap||-||See what may be added in the future|
|Release History||-||A list of all releases|