This is the repository for the Pragma Game Engine. For more information, visit the official website: https://pragma-engine.com/
All versions include the core Engine, as well as the Pragma Filmmaker (PFM).
You can find older releases in the releases section of this repository. No installation is required, simply extract the archive somewhere and launch the pragma
or pfm
executable.
Supported languages: English, Deutsch, Français, Español, Italiano, Polski, 日本語, 中文 (Zhōngwén),
In addition, there is also an automated nightly release with all of the latest features which you can find here, but it is not guaranteed to be stable or functional.
PFM automatically checks for updates when you launch it, and can automatically install them as well, so you don't have to download new releases manually.
- Windows 10 (or newer) / Ubuntu 24.04 (or newer)
- Graphics card: GTX 1050 Ti or newer
If you would like to contribute to the development of the Pragma Filmmaker, please go to the PFM repository for more information.
The recommended way to work with Pragma is through the Lua API. If this is not enough, and you need more control, you will have to build Pragma manually. You can find the build instructions below.
Please consider creating a binary module if you're planning on adding new features that don't require any changes to the existing code files. This way the module can simply be installed into existing releases of Pragma. (You will still have to set up a build of Pragma before creating a binary module.)
- ~60 GiB of disk space
- CMake 3.28.3 or newer
- Python 3.9.5 or newer, with NumPy
- Visual Studio 2022 or newer
- Windows SDK 10.0.22000.0 or newer
- Ubuntu 24.04 or newer
- clang-18 or newer (Pragma is not compatible with gcc!)
To build Pragma, all you have to do is run the following command from a command-line interface:
git clone https://github.com/Silverlan/pragma.git && cd pragma && python build_scripts/build.py --with-pfm --with-all-pfm-modules --with-vr
This will clone Pragma and run the build-script, which will automatically download all dependencies, configure CMake, and build and install the project (this will take several hours).
If you don't need the filmmaker, you can omit the --with-pfm --with-all-pfm-modules
arguments, which will reduce the build time and the required amount of disk space.
⚠️ Linux
Do not run the script as superuser.
The script will automatically install all required system packages. Since this requires admin priviliges, you may be prompted for your password several times.
You can disable confirmation prompts (e.g. for automated builds) by adding the--no-confirm
argument, however entering your password may still be required.
Once the build script has been completed, you can find the build files in pragma/build
, and the install files in pragma/build/install
. The install
directory contains everything you need to run Pragma.
To update Pragma to a newer version (assuming the command above has completed successfully at least once), you can use the following command:
python build_scripts/build.py --update
This will pull all of the latest changes for the Pragma repository and the modules. The --update
option will re-use all of the arguments used in the last execution of the build script, so you don't have to specify them again.
If you just wish to re-run the build script without updating to the latest commit, you can use the --rerun
option instead. Like the --update
option, this will also re-use the arguments used in the last execution of the build script.
If you make any code changes to the core engine code, you can build the pragma-install
target to build them. This will also re-install the binaries.
If you make any code changes to a module, you will have to build the module build target first, and then build pragma-install
afterwards.
Running the build-script with the arguments above will build and install Pragma and the Pragma Filmmaker with all dependencies. Alternatively you can also configure the build to your liking with the following parameters:
Parameter | Description | Default |
---|---|---|
--help |
Display this help | |
--generator <generator> |
The generator to use. | Windows: Visual Studio 17 2022 Linux: Ninja Multi-Config |
--c-compiler |
[Linux only] The C-compiler to use. | clang-18 |
--cxx-compiler |
[Linux only] The C++-compiler to use. | clang++-18 |
--no-sudo |
[Linux only] Will not run sudo commands. System packages will have to be installed manually. | 0 |
--no-confirm |
[Linux only] Disable any interaction with user (suitable for automated run). | 0 |
--with-essential-client-modules <1/0> |
Include essential modules required to run Pragma. | 1 |
--with-common-modules <1/0> |
Include non-essential but commonly used modules (e.g. audio and physics modules). | 1 |
--with-pfm <1/0> |
Include the Pragma Filmmaker. | 0 |
--with-core-pfm-modules <1/0> |
Include essential PFM modules. | 1 |
--with-all-pfm-modules <1/0> |
Include non-essential PFM modules (e.g. chromium and cycles). | 0 |
--with-vr <1/0> |
Include Virtual Reality support. | 0 |
--with-networking <1/0> |
Include networking module(s) for multiplayer support. | 0 |
--with-lua-debugger <1/0> |
Include Lua-debugger support. | 0 |
--with-swiftshader <1/0> |
Include SwiftShader support for CPU-only rendering. | 0 |
--build-swiftshader <1/0> |
Builds SwiftShader from source instead of downloading prebuilt binaries. | 0 |
--build-cycles <1/0> |
Build the Cycles library (otherwise uses pre-built binaries). Requires --with-all-pfm-modules | 0 |
--build <1/0> |
Build Pragma after configurating and generating build files. | 1 |
--build-all <1/0> |
Build all dependencies instead of downloading prebuilt binaries where available. | 0 |
--build-config <config> |
The build configuration to use. | RelWithDebInfo |
--build-directory <path> |
Directory to write the build files to. Can be relative or absolute. | build |
--deps-directory <path> |
Directory to write the dependency files to. Can be relative or absolute. | deps |
--install-directory <path> |
Installation directory. Can be relative (to build directory) or absolute. | install |
--verbose <1/0> |
Print additional debug information. | 0 |
--update <1/0> |
Update Pragma and all submodules and modules to the latest versions. | 0 |
--rerun <1/0> |
Re-run the build script with the previous arguments. | 0 |
--module <moduleName>:<gitUrl> |
Custom modules to install. Use this parameter multiple times to use multiple modules. | |
--cmake-arg <arg> |
Custom CMake configuration option. Use this parameter multiple times for multiple options. | |
--vtune-include-path <path> |
Path to VTune include folder. Required for CPU profiling with Intel VTune Profiler. | |
--vtune-library-path <libPath> |
Path to "libittnotify" VTune library. Required for CPU profiling with Intel VTune Profiler. |
Example for using the --module
parameter:
--module pr_physx:"https://github.com/Silverlan/pr_physx.git"
Alternatively you can also add custom modules by editing pragma/build_scripts/user_modules.py
. (This is the recommended method.)
To build Pragma with PFM, add the --with-pfm --with-all-pfm-modules
options. Due to licensing issues, this will only include a pre-built version of the Cycles renderer without OptiX support.
If you want to have full CUDA and OptiX support when rendering with Cycles, you will have to add the --build-cycles
option as well. You will also have to install the following before you do so:
- SlikSVN (Windows only)
- CUDA Toolkit 12.2
- OptiX SDK 7.3.0 (NVIDIA account required)
Please note that newer versions of CUDA or OptiX will likely not work.
If you want to add functionality to Pragma without changing the core source code, you can do so by creating a custom binary module. The setup for this is very simple and only takes a few minutes. For more information, please check out the wiki article.
There are also various pre-made binary modules available for Pragma, some of which are already included with this repository, and some of which can be found online:
⚠️ Some of these modules have not been maintained and may no longer be compatible with the latest version of Pragma.
- pr_chromium: https://github.com/Silverlan/pr_chromium
- pr_curl: https://github.com/Silverlan/pr_curl
- pr_mysql: https://github.com/Silverlan/pragma/tree/main/modules/pr_mysql
- pr_pcl: https://github.com/Silverlan/pragma/tree/main/modules/pr_pcl
- pr_prosper_opengl: https://github.com/Silverlan/pr_prosper_opengl
- pr_prosper_vulkan: https://github.com/Silverlan/pr_prosper_vulkan
- pr_socket: https://github.com/Silverlan/pragma/tree/main/modules/pr_socket
- pr_video_recorder: https://github.com/Silverlan/pragma/tree/main/modules/pr_video_recorder
- pr_xml: https://github.com/Silverlan/pragma/tree/main/modules/pr_xml
- pr_audio_dummy: https://github.com/Silverlan/pragma/tree/main/modules/pr_audio_dummy
- pr_cycles: https://github.com/Silverlan/pr_cycles
- pr_source: https://github.com/Silverlan/pr_source
- pr_xatlas: https://github.com/Silverlan/pr_xatlas
- pr_openvr: https://github.com/Silverlan/pr_openvr
- pr_truesky: https://github.com/Silverlan/pr_truesky
- pr_opensubdiv: https://github.com/Silverlan/pr_opensubdiv
- pr_sqlite: https://github.com/Silverlan/pr_sqlite
- pr_xnalara: https://github.com/Silverlan/pr_xnalara
- pr_mpv: https://github.com/Silverlan/pr_mpv
- pr_dmx: https://github.com/Silverlan/pr_dmx
- pr_steamworks: https://github.com/Silverlan/pr_steamworks
- pr_gpl: https://github.com/Silverlan/pr_gpl
- pr_steam_networking_sockets: https://github.com/Silverlan/pr_steam_networking_sockets
- pr_physx: https://github.com/Silverlan/pr_physx
- pr_bullet: https://github.com/Silverlan/pr_bullet
- pr_audio_fmod: https://github.com/Silverlan/pr_audio_fmod
- pr_audio_alure: https://github.com/Silverlan/pr_audio_alure
To build a module, simply run the build-script with the following parameter:
--module <moduleName>:<gitUrl>
The build script will clone, build and install the module automatically. Alternatively you can also download the module manually to pragma/modules
and omit the :<gitUrl>
portion of the parameter.
If you only want to install a module without building it, you can also run the following console command from within Pragma to download and install the module automatically:
install_module <githubModuleName> [<version>]
The githubModuleName
consists of the GitHub username and the repository name.
If no version is specified, the latest release binaries will be used.
Example:
install_module Silverlan/pr_curl
In addition to binary modules, Pragma also uses Lua as scripting language, with thousands of available function, class and library bindings. To get more information about the Lua API, check out the official wiki. An example for a Lua-addon is the Pragma Filmmaker.
- SlawekNowy: For helping to make Linux support possible
- REDxEYE: For creating the Pragma asset import plugin for Blender
- ZeqMacaw: For their work on Crowbar
- All of the contributors of the third-party libraries used by Pragma/PFM