Platformer Module
A domain module providing standard layout stamps for Platformer games. These functions generate geometry using standard Layout primitives. They are agnostic to the layer or content type, allowing flexible reuse.
Types
| Type | Description |
|
Anchor side for ledges or alignment. |
|
|
Direction for stairs and slopes construction. |
Functions and values
| Function or value |
Description
|
Full Usage:
box width height border fill section
Parameters:
int
-
Total width including border.
height : int
-
Total height including border.
border : 'T
-
Content for the border.
fill : 'T
-
Content for the interior.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a rectangular box with a border and filled interior.
|
Full Usage:
gap width height section
Parameters:
int
-
Width of the gap.
height : int
-
Height of the gap.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Creates a rectangular empty area by clearing cells. Use this to carve out spaces in existing terrain.
|
Full Usage:
ledge width anchor tile section
Parameters:
int
anchor : Anchor
tile : 'T
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a horizontal platform anchored to a specific side of the section.
|
Full Usage:
pillar height baseTile middleTile topTile section
Parameters:
int
baseTile : 'T
middleTile : 'T
topTile : 'T
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a 1-tile wide vertical structure with distinct base, middle, and top tiles.
|
Full Usage:
pit width depth section
Parameters:
int
-
Width of the pit.
depth : int
-
Depth of the pit (how many cells to clear vertically).
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Creates a horizontal pit (gap in the ground) by clearing a column of cells. Use this to create fall-through areas or deadly gaps.
|
Full Usage:
platform width tile section
Parameters:
int
-
Width of the platform.
tile : 'T
-
Content for the platform.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a horizontal platform.
|
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. Useful for adding "vines" or "spikes" to platforms.
|
Full Usage:
slope width height tile direction section
Parameters:
int
height : int
tile : 'T
direction : StairDirection
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a smooth diagonal slope using line rasterization.
|
Full Usage:
stairs width tile direction section
Parameters:
int
-
Total width of the stairs area.
tile : 'T
-
Content for the steps.
direction : StairDirection
-
Direction of the stairs.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a staircase.
|
Full Usage:
wall height tile section
Parameters:
int
-
Height of the wall.
tile : 'T
-
Content for the wall.
section : GridSection2D<'T>
Returns: GridSection2D<'T>
Modifiers: inline Type parameters: 'T |
Generates a vertical wall or pillar.
|
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. Perfect for adding moss to stone or cracks to walls.
|
Mibo