CrawfisSoftware.Tiling 1.0.3

dotnet add package CrawfisSoftware.Tiling --version 1.0.3
                    
NuGet\Install-Package CrawfisSoftware.Tiling -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CrawfisSoftware.Tiling" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CrawfisSoftware.Tiling" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="CrawfisSoftware.Tiling" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CrawfisSoftware.Tiling --version 1.0.3
                    
#r "nuget: CrawfisSoftware.Tiling, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CrawfisSoftware.Tiling@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CrawfisSoftware.Tiling&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=CrawfisSoftware.Tiling&version=1.0.3
                    
Install as a Cake Tool

CrawfisSoftware.Tiling

Core tiling primitives for building Wang-style 2D tilings, maze/dungeon renderers, and SVG/Unity outputs. The library targets netstandard2.1 and is packaged for both NuGet and Unity UPM. It supplies tiles, tile sets, enumerators, selectors, and builders that higher-level projects consume (see ExampleProjects).

Features

  • Tiles: ITile2D/Tile2D expose edge colors and identifiers so adjacent tiles can be constrained.
  • Tile sets: ITileSet, TileSet, CompositeTileSet, AbstractMazeTileSet, AbstractPartialTileSet, factories, and a singleton TileDatabase for registering and cloning sets.
  • Selection: RandomTileSelector and SequentialTileSelector pick tiles that satisfy neighbor constraints with an optional DefaultTile fallback.
  • Enumeration: visit order and masking via ITilingEnumerator implementations such as Sequential, Random, ZOrder, Zigzag, Spiral, Hilbert, Boundary, Corner, UpperLeftQuadrant, Masked, and Rectangle decorator.
  • Builders: MatchingTilingBuilder (constraint-based Wang tilings), RandomTilingBuilder, and TilingBuilder (stamping/placement utilities) produce concrete ITiling2D instances.
  • Utilities: TileSetUtilities for rotation/permutation/remapping, TilingRemapper, and explicit tiling containers (ExplicitTiling2D).
  • Unity stubs: src/UnityStubs enables non-Unity builds and NuGet consumption.

Getting started

Install from NuGet:

dotnet add package CrawfisSoftware.Tiling

Unity (UPM) via Git tag:

https://github.com/Crawfis-Software/CrawfisSoftware.Tiling.git?path=Packages/com.crawfissoftware.tiling#v<version>

Quick example

using CrawfisSoftware.Tiling;
using CrawfisSoftware.Tiling.TileSets;
using CrawfisSoftware.Tiling.TilingBuilders;
using CrawfisSoftware.Tiling.TilingEnumerators;

var tileSet = new AbstractMazeTileSet();
var builder = new MatchingTilingBuilder(width: 8, height: 8)
{
    TilingEnumerator = new SpiralTilingEnumerator(),
    TileSelector = new RandomTileSelector
    {
        DefaultTile = tileSet.DefaultTile
    }
};

builder.UpdateTiling(tileSet);
ITiling2D tiling = builder.GetTiling();
var tile = tiling.Tile(0, 0); // access placed tiles

For more end-to-end usage (SVG output, maze generation, Truchet tiles), see ExampleProjects/TruchetTilingSVG and ExampleProjects/MazeTilingSVG.

Repository layout

  • src/Common/Runtime: core interfaces, tile sets, selectors, enumerators, builders, utilities.
  • src/UnityStubs: minimal types to allow non-Unity builds.
  • Packages/com.crawfissoftware.tiling: Unity UPM package manifest/assembly definition.
  • ExampleProjects/*: sample console apps that generate SVG tilings using this library.
  • .github/workflows/nuget-package.yml: automated packing/publishing workflow.

Build & publish

  • Build/pack NuGet: dotnet pack CrawfisSoftware.Tiling.csproj -c Release -o ./artifacts (targets netstandard2.1).
  • UPM tarball: npm pack Packages/com.crawfissoftware.tiling (from repo root) or consume directly via Git URL above.
  • Releases: tag v<version> to trigger the GitHub Actions workflow that builds, uploads artifacts, and (when configured) pushes to nuget.org via trusted publishing.

License

CC0 1.0 Universal. See LICENSE.txt.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CrawfisSoftware.Tiling:

Package Downloads
CrawfisSoftware.MazeTilings

Package Description

CrawfisSoftware.CrawfisSoftware.MazeTilings

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 95 1/24/2026
1.0.1 92 1/24/2026
1.0.0 90 1/24/2026
0.2.0 223 1/23/2026

Please see CHANGELOG.md for release details.