DocsNodesValues

Grid Init

Creates the board that a grid game keeps its state in.

board, tiles, grid, map, territory, state buffer, cells
Category
Values
Outputs
value
Runs live in
no target yet

A grid of cells, each holding a number that says who owns it. Empty starts everything unclaimed; Checker and Quadrants start with a pattern already laid down, which is useful for two players starting from opposite corners.

This is the buffer everything else in the grid family reads from and writes to. Make it once, then pass it through the nodes that change it.

Inputs

SocketTypeWiring

Parameters

NameTypeDefaultAvailable whenWhat it does
Widthnumber10always
Heightnumber10always
Patternempty | checker | quadrants | centeremptyalways

Built with this node

Nothing in the manual is built around this node yet.

See also

  • gridCellTo work out which cell a world position falls in.
  • gridColorTo colour the tiles by who owns them.

Open the editor and try it