CrawfisSoftware.Tiling
1.0.3
dotnet add package CrawfisSoftware.Tiling --version 1.0.3
NuGet\Install-Package CrawfisSoftware.Tiling -Version 1.0.3
<PackageReference Include="CrawfisSoftware.Tiling" Version="1.0.3" />
<PackageVersion Include="CrawfisSoftware.Tiling" Version="1.0.3" />
<PackageReference Include="CrawfisSoftware.Tiling" />
paket add CrawfisSoftware.Tiling --version 1.0.3
#r "nuget: CrawfisSoftware.Tiling, 1.0.3"
#:package CrawfisSoftware.Tiling@1.0.3
#addin nuget:?package=CrawfisSoftware.Tiling&version=1.0.3
#tool nuget:?package=CrawfisSoftware.Tiling&version=1.0.3
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/Tile2Dexpose edge colors and identifiers so adjacent tiles can be constrained. - Tile sets:
ITileSet,TileSet,CompositeTileSet,AbstractMazeTileSet,AbstractPartialTileSet, factories, and a singletonTileDatabasefor registering and cloning sets. - Selection:
RandomTileSelectorandSequentialTileSelectorpick tiles that satisfy neighbor constraints with an optionalDefaultTilefallback. - Enumeration: visit order and masking via
ITilingEnumeratorimplementations such asSequential,Random,ZOrder,Zigzag,Spiral,Hilbert,Boundary,Corner,UpperLeftQuadrant,Masked, andRectangledecorator. - Builders:
MatchingTilingBuilder(constraint-based Wang tilings),RandomTilingBuilder, andTilingBuilder(stamping/placement utilities) produce concreteITiling2Dinstances. - Utilities:
TileSetUtilitiesfor rotation/permutation/remapping,TilingRemapper, and explicit tiling containers (ExplicitTiling2D). - Unity stubs:
src/UnityStubsenables 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(targetsnetstandard2.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 | Versions 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. |
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- System.Data.DataSetExtensions (>= 4.5.0)
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.
Please see CHANGELOG.md for release details.