• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    C++
  • License
    Mozilla Public Li...
  • Created over 5 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository for the pragma game engine.

Build Windows Build Linux

Pragma Logo

What is this?

This is the repository for the Pragma Game Engine. For more information, visit the official website: https://pragma-engine.com/

Download

All versions include the core Engine, as well as the Pragma Filmmaker (PFM).

Stable

Download

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),

Nightly

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.

Updating

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.

Media

What platforms and hardware does it work on?

  • Windows 10 (or newer) / Ubuntu 22.04 LTS (or newer)
  • Graphics card: GTX 1050 Ti or newer

Contributions

PFM

If you would like to contribute to the development of the Pragma Filmmaker, please go to the PFM repository for more information.

Pragma

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.)

Build Requirements

  • ~60 GiB of disk space
  • CMake 3.21.4 or newer
  • Python 3.9.5 or newer
Windows
  • Visual Studio 2022 or newer
  • Windows SDK 10.0.22000.0 or newer
Linux
  • clang-15 or newer (Pragma is not compatible with gcc!)

Build Instructions

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.

Update

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.

Code Changes

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.

Build Customization

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: Unix Makefiles
--c-compiler [Linux only] The C-compiler to use. clang-15
--cxx-compiler [Linux only] The C++-compiler to use. clang++-15
--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-lua-debugger <1/0> Include Lua-debugger support. 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.)

PFM

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:

Please note that newer versions of CUDA or OptiX will likely not work.

Modules

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.

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

Addons

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.

Special Thanks

More Repositories

1

pfm

Repository for the pragma filmmaker
Lua
24
star
2

util_source2

Libray for loading various Source 2 asset types
C++
9
star
3

wgui

The GUI library used by the pragma game engine.
C++
7
star
4

mathutil

Math utility library used in the pragma game engine.
C++
6
star
5

materialsystem

Material system used by the pragma game engine.
C++
4
star
6

sharedutils

Utility library used in the pragma game engine.
C++
4
star
7

util_archive

C++
3
star
8

pragma_tf2

Implementation of various TF2 entities for Pragma
Lua
3
star
9

pr_prosper_vulkan

Pragma module for the Vulkan graphics API
CMake
3
star
10

pragma_hl

Implementation of common Source Engine entities for Pragma
Lua
3
star
11

util_smdmodel

Library used for loading SMD model files.
C++
3
star
12

prosper

Graphics rendering framework used for the Pragma game engine.
C++
3
star
13

prosper_vulkan

Vulkan implementation for prosper
C++
3
star
14

alsoundsystem

Sound library for the pragma game engine.
C++
3
star
15

util_udm

Unified Data Model library used for the Pragma Engine asset formats.
C++
2
star
16

util_pad

Library for managing pragma package data files.
C++
2
star
17

iglfw

GLFW wrapper used by the pragma game engine.
C++
2
star
18

prosper_opengl

OpenGL implementation for prosper
C
2
star
19

luasystem

Lua interface library for the pragma game engine.
C++
2
star
20

pragma_interfaces

Interface libraries for the pragma game engine.
C++
2
star
21

datasystem

Datasystem library for the pragma game engine.
C++
2
star
22

util_bsp

Library for loading BSP map files.
C++
2
star
23

pr_physx

PhysX physics module for the Pragma game engine.
C++
2
star
24

networkmanager

The networking library used for the pragma game engine.
C++
1
star
25

pr_prosper_opengl

Pragma module for the OpenGL graphics API
C++
1
star
26

pr_cycles

Pragma raytracing module for offline rendering
C
1
star
27

test_pragma_ga

Github action test for Pragma
C++
1
star
28

util_udm_appveyor_test

Appveyor Test
C++
1
star
29

pr_blender

Blender python module binaries and scripts used by the Pragma Game Engine
Python
1
star
30

util_image

Library for loading and transforming various game image formats.
C
1
star
31

pr_curl

Curl module for the Pragma game engine
C++
1
star
32

pr_chromium

Chromium module for the Pragma Game Engine
C++
1
star
33

util_video_recorder

Library for recording video and audio using FFMpeg.
C++
1
star
34

pfm_tutorials

Interactive tutorials for PFM.
Lua
1
star
35

pr_assimp

Assimp module for the Pragma Game Engine
CMake
1
star
36

vfilesystem

The filesystem library used in the pragma game engine.
C++
1
star
37

util_vmf

Library for loading VMF map files.
C++
1
star
38

util_source_script

Library for loading source engine scenes and wav phonemes.
C++
1
star
39

hllib

Unofficial repository for Nem's HLLib library.
C++
1
star
40

cppbepuik

C++ Implementation of the BEPUik subsystem of the BEPUphysics (v1) physics library.
C++
1
star
41

pragma_prerelease_archive

Archive of Pragma pre-release versions
1
star
42

panima

Animation library for the Pragma Game Engine
C++
1
star