Version 0.7.0

The version corresponds to the IJCAI 2018 submission (rejected) [Manuscript (with some modifications like adding author names)]. The Dungeon example from the last version is updated with new rendering scheme as well as adjusted GIGL code (and also added a variation that generate a special "boss room" in each dungeon level). In addition, a new example is shown, called Tree example, which is a PCG based on L-systems. Blue indicates new keywords introduced by GIGL and grey "..." in the code figure indicates omission. (Note that the code formatting style in different places are slightly different, please regard either the source file versions as standards rather than the manuscript/webpage versions.)

Dungeon Level Generator

Examples of generated dungeon levels when set not to generate "boss rooms".

Examples of generated dungeon levels when set to generate exactly one "boss room" (in red).

The Dungeon example; partial GIGL code.

[Download Complete GIGL Code]

[Download Full Source containing GIGL translated (generated) Code] (need OpenGL and SDL)

L-System Tree Generator

n = 1

n = 2

n = 5

Examples of trees generated by L-system grammar F := F[-F][+F]F, when expanding deterministically up to some depth (with two versions of rendering shown for each case).

Unconstricted

Tuned

Examples of trees generated based on a very similar grammar above with stochastic components added, with unconstricted and tuned (advanced) randomness.

The Tree example; partial GIGL code.

[Download Complete GIGL Code]

[Download Full Source containing GIGL translated (generated) Code] (need OpenGL and SDL)

Updates

1. Important syntax update: now all configure parameters are wrapped in braces instead of parentheses (to be better distinguished against parameters to nonterminal generators, and also to be more consistent to the syntax of rule probability instantiation), both in declaration and instantiation. To get around parser conflict, the item type declaration (gigltype) need a colon after the type name.

2. Add default probability normalization and default negative probability correction (corrects to zero), and options to disable either of them.

3. A more complete set of blocks are implemented for default rules (including pre-selectors, pre-constructors/generators, post-destructors, and attributes).

4. A more complete set of ways to manipulate rule probabilities in pre-selectors (forbid, force, referencing rule prob. with name or index etc.)

5. Add some convenient syntax for configuring probabilities (implicit, specified, prev/post, remain, prev/post-remain, referencing rule prob. with name or index etc.)

6. Allow custom configure parameter be declared with dynamic keyword, for run-time binding of the lambda function even for multiple instances in the generator of the same node (or at the wrapper level). Without dynamic keyword, the binding by default only re-evaluated across different nodes, or between wrapper and nodes.

Resources

[gigl] (main gigl)

[simplecpp] (used to add part of C++ features that are not in C)

Note: build the above with an appropriate (not necessary latest) version of Silver and AbleC to get the GIGL translator.