Make It Tile

Development Discontinued | Discuss

Documentation | Demos

Requires Unity 5.0.0 or higher.

A serious tile and topology framework for serious engineers.

Make It Tile is a framework for Unity to aid in the creation and usage of tile-based game worlds. Through its carefully engineered data structures, it is designed to be maximally flexible, applying just as easily to the simple 8x8 game world of chess as to a large hex grid in a strategy game or even an irregular arrangement of tiles on the surface of a sphere. It includes support for:

As a bonus, and in support of tiled world generation, Make It Tile includes the full Make It Random and Make It Colorful libraries.

In addition to the above features, the framework is very extensible, to support whatever tiling patterns, tile attributes, and algorithms you might need. Full source code is included.

Scripting Note: Although the framework does contain some experimental high-level tools usable directly within the editor, it is not designed as a top-to-bottom solution, but is rather intended to be a foundation upon which many different game mechanics can be easily built. Additional scripting will therefore be necessary in almost all cases.

The Details



Wrap-Around Worlds

Mouse Picking

A* Path Finding

Dynamic Mesh Generation

Tile Visitation


Here is a sample of creating a square grid and performing arbitrary operations over the elements of the resulting topology.

using UnityEngine;
using Experilous.MakeItTile;

// Create a square grid.
RectangularQuadGrid surface = var grid = RectangularQuadGrid.Create(
    Vector2.right, Vector2.up,         // 2D axes
    Vector3.zero, Quaternion.identity, // origin and orientation
    false, false,                      // axis wrap-around
    new IntVector2(5, 3));             // grid size
Vector3[] vertexPositionsArray;
Topology topology = surface.CreateManifold(out vertexPositionArray);
var vertexPositions = vertexPositionsArray.AsVertexAttribute();
var faceColors = new FaceAttributeArrayWrapper<Color>(topology.internalFaces.Count);
var edgeCosts = new EdgeAttributeArrayWrapper<float>(new float[topology.halfEdges.Count]);

// Element collections can be enumerated using a foreach loop:
foreach (Topology.Vertex vertex in topology.vertices)
    Debug.LogFormat("{0}", vertexPositions[vertex]); // Log out the position of each vertex.

// They can also be accessed by integer indices:
for (int i = 0; i < topology.faces.Count; ++i)
    Topology.Face face = topology.faces[i];
    faceColors[face] = Color.red;

// The two subsets of faces, internal and external, can also be enumerated:
foreach (Topology.Face face in topology.internalFaces)
    // do something with the face

// The edges are accessible in three varieties, all representing
// the same set of edges, but producing different behavior in
// certain cases, as will be explained in other topics.
foreach (Topology.HalfEdge edge in topology.halfEdges)
    edgeCosts = UnityEngine.Random.value + 1f;

// While accessing all the elements, the neighbors of each
// individual element can also be enumerated within inner loops.
foreach (Topology.Vertex vertex in topology.vertices)
    // Automatic enumeration using the edges property
    foreach (Topology.VertexEdge edge in vertex.edges)
        Debug.LogFormat("From Vertex {0} to Vertex {1}, Edge Cost = {2}",

    // Manual enumeration using the firstEdge and next properties
    var firstEdge = vertex.firstEdge;
    var currentEdge = firstEdge;
        // do something with currentEdge
        currentEdge = currentEdge.next;
    } while (currentEdge != firstEdge);