TopDown Module
A domain module providing standard layout stamps for top-down games. These functions generate enclosed spaces, corridors, and wall structures using standard Layout primitives. They are agnostic to layer or content type, allowing flexible reuse.
Types
| Type | Description |
|
Direction for corridor construction. |
Functions and values
| Function or value |
Description
|
Full Usage:
corridor length width direction floor wall section
Parameters:
int
-
Length of the corridor.
width : int
-
Width of the corridor (floor + walls).
direction : CorridorDirection
-
Direction of the corridor.
floor : 'T
-
Content for the floor.
wall : 'T
-
Content for the walls.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a corridor (floor with side walls). Use Layout.section to position the corridor where needed.
|
Full Usage:
doorway length wall section
Parameters:
int
-
Total length of the wall including the gap.
wall : 'T
-
Content for the wall.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a wall segment with a gap (doorway opening). Position and place this where needed - it's just a wall with a 1-tile gap.
|
Full Usage:
room width height floor wall section
Parameters:
int
-
Width of the room (including walls).
height : int
-
Height of the room (including walls).
floor : 'T
-
Content for the floor.
wall : 'T
-
Content for the walls.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a rectangular room with walls and floor.
|
Full Usage:
scatterEdges count seed content section
Parameters:
int
seed : int
content : 'T
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Scatters content along the outer edges of the current section.
|
Full Usage:
wallSegment length wall section
Parameters:
int
-
Length of the wall.
wall : 'T
-
Content for the wall.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a horizontal wall segment.
|
Full Usage:
weather oldContent newContent probability seed section
Parameters:
'T
newContent : 'T
probability : float32
seed : int
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Non-destructively decorates existing surfaces by replacing a percentage of tiles.
|
Mibo