Documentation

Everything you need to create a game with FRAG

Documentation is still very much a work in progress. Please understand there may be rapid changes to this section of the website.

Documentation Progress: 5%

Running

Desktop Examples


Setup instructions for running the desktop examples depend on your operating system.

Windows

Ensure DLLs are in the search path

On the Windows operating system, the DLLs for all of the various FRAG dependencies, must be included in the search path Windows searches for DLLs in.

The simplest option is to place them inside of the frag\examples directory, and then run the examples from there. Other options include placing them inside of a directory already included in the search path, or placing them inside of a directory and adding this directory to the PATH environment variable. Users should follow this pattern for linking all FRAG dependencies, including optional ones like Chipmunk2D and Spine when desired.

More Information

OSX | Linux

Ensure shared libraries are in the linker search path

On the Linux and OSX operating systems, the shared libraries for all of the various FRAG dependencies, must be included in the search path of the linker being used to link the example application.

The nim.cfg file in the frag/examples directory contains relative paths for both operating systems, which point to the BGFX shared library. Another option is to place dependencies in paths already known to the linker, such as /usr/local/lib. Users should follow this pattern for linking all FRAG dependencies, including optional ones like Chipmunk2D and Spine when desired.


Once the steps listed above have been completed, execute the following command from the frag/examples directory for a list of available examples:

nim tasks

You should see output similar to:

D00 : Desktop - Hello World
D01 : Desktop - Sprite Batch
D02 : Desktop - Audio
D03 : Desktop - Input
D04 : Desktop - Sprite Animation
D05 : Desktop - GUI
D06 : Desktop - Physics

To run an example, provide the example’s id as an option:

nim D00