LevelGen

LevelGen module API reference: 7 headers · 24 types · 187 symbols.

Generated from levelgen.json · Oct 26, 2026Version 1.0.0
Build name
MowoEngine.LevelGen
Source
Engine/Source/Runtime/LevelGen/Public
Category
Runtime
Contents
7 headers · 24 types · 187 symbols

LevelGen/LevelGeneration.h

KindTypeSummary
classFLevelGenerationOne LevelGenerationComponent's play-time generation, as the scene system runs it: the grammar, the seed by role (the host decides and sends it, a client waits for it, offline uses its own), the layout, the nine passes, t

LevelGen/LevelGenerationComponent.h

KindTypeSummary
structLevelGenerationComponentDrop one in a scene to generate the level at play: the grammar (the built-in AJAX facility when empty), the seed, and where the grid starts (the entity's position). The runtime half reports what came out.

LevelGen/LevelGenerator.h

KindTypeSummary
classFLevelRandomA deterministic 32-bit PCG stream. Its own, not FRandomStream: the level a seed produces is pinned by golden hashes across builds, so the generator's randomness must never change when something else's does.
structFLevelNode
structFLevelGraphThe room graph (audit G2: graph first). Always a tree: Insert and Attach keep it one, Replace only retypes.
structFLevelPlacementWhere one room's module landed: grid origin (the cell its rotated footprint's minimum corner sits on) and quarter turns clockwise.
structFLevelLayout
structFLevelWorldSocketA socket after its module was rotated and placed: world cell and side.
classFLevelGenerator

LevelGen/LevelGrammar.h

KindTypeSummary
enumELevelSideGrid sides. +Y is north on the grid and -Z in the world (the engine's forward), +X is east in both.
structFLevelSocketAn opening on a module's edge: the cell it is on (module-local, before rotation), which side of that cell, and how wide the doorway is.
structFLevelModuleDefA chunk on the 4 m grid (audit G1): a footprint of whole cells, its sockets, the prefab that builds it, and the numbers the validator reads.
enumELevelRuleKind
structFLevelRuleOne rewrite rule of the grammar (audit G3). Rules are picked by weight among those that apply; MaxApplications < 0 is unlimited.
structFLevelTypeLimit
classFLevelGrammarThe whole generator configuration, one .levelgrammar MDF asset: the starting chain, the rules, the module catalogue and the validation budget.

LevelGen/LevelSeedReplication.h

KindTypeSummary
enumELevelSeedRoleWho decides the seed of a generated level.
structFLevelSeedRecordWhat one generated level needs to be the same level on every machine: the seed — everything else is the grammar, which ships with the game. The grammar's hash rides along so a client running different content says so ins
classFLevelSeedReplicationFLevelSeedReplication — the host's seeds, sent once per level instead of the level. A module level becomes Level Instances whose actor ids derive from the seed and the room, so the clients that build from the same seed h

LevelGen/LevelSpawner.h

KindTypeSummary
structFLevelSpawnItemOne prefab the spawner would place: a room module, a cap on an open doorway, or a shared wall between two rooms that touch without one.
classFLevelSpawnerTurns a layout into prefab placements and instantiates them. Grid +X is world +X, grid +Y is world -Z (the engine's forward); a module prefab is authored with its origin at the centre of its unrotated footprint and its d

LevelGen/LevelValidator.h

KindTypeSummary
structFLevelValidationPass
structFLevelValidationReport
classFLevelValidatorThe nine validation passes of audit G4, run over a generated layout: 1 Embedded every room of the graph has a module on the grid 2 NoOverlap no grid cell holds two modules 3 SocketsMeet every linked door

Page feedback

Was this page helpful?