• About
  • Tutorials
  • Get Started
  • Demo

Sylves - Handle the maths and algorithms for the geometry of grids

An open-source C# Library usable from Unity, .NET and Godot suitable for games and procedural generation.

Getting Started Download Latest Try a demo Release Notes

// Create a 10x10 grid of squares of size 1.
var grid = new SquareGrid(1, new SquareBound(0, 0, 10, 10));
// List all 100 cells
var cells = grid.GetCells();
// Print the centers of each cell.
foreach(var cell in cells)
{
    Console.Log($"{cell}: {grid.GetCellCenter(cell)}");
}

Wide grid support

Many useful grids are supported, of all types. 2d/3d, infinite, irregular grids are all supported, with support for creating your own grids too.
A common interface, IGrid, is used so you can swap between grids with ease.

See all grids Basic concepts
All grids
Pathfinding

Grids as graphs

Grids can be traversed cell-by-cell, including support for rotation and pathfinding.

Grids as geometry

Grid cells have known shapes and positions, that can easily be queried.
Tiles can be warped to fit irregular grids with deformation.

Cell picker
Documentation

Fully documented

Sylves comes with conceptual documentation, a full API reference, tutorials and even a working Unity project demoing the features.

Tutorials

Try out some tutorials

Langton's Ant Tutorial
Langton's Ants

Learn how to move an entity around on a grid.

Paint Tutorial
Paint program

How to translate mouse inputs to changes to a grid.

Your browser does not support the video tag.
Townscaper

How to recreate the grids from indie hit Townscaper.

In This Article