GridForge 6.0.6
dotnet add package GridForge --version 6.0.6
NuGet\Install-Package GridForge -Version 6.0.6
<PackageReference Include="GridForge" Version="6.0.6" />
<PackageVersion Include="GridForge" Version="6.0.6" />
<PackageReference Include="GridForge" />
paket add GridForge --version 6.0.6
#r "nuget: GridForge, 6.0.6"
#:package GridForge@6.0.6
#addin nuget:?package=GridForge&version=6.0.6
#tool nuget:?package=GridForge&version=6.0.6
GridForge
![]()
GridForge is a deterministic voxel-world library for building fast spatial systems in games, simulations, tools, and server runtimes.
It gives you the low-level grid infrastructure that many systems end up reinventing: snapped voxel bounds, world-scoped grid registration, conjoined-grid neighbor awareness, scan-cell query overlays, blocker and obstacle state, occupant tracking, and fixed-point spatial math.
The interesting part is the shape of the model. GridForge does not force you into one giant grid, a hand-managed tile map, or a premature hierarchy. It gives you an explicit GridWorld that can own one grid, many conjoined grids, or a streamed set of active grids, while still leaving room for higher-level sector, region, planet, or shard systems above it.
Why GridForge?
Grid-based systems tend to split into three common approaches:
| Approach | Best fit | Tradeoff |
|---|---|---|
| Single large grid | Small or fixed worlds | Simple, but can become wasteful or awkward to stream |
| Multiple conjoined grids | Large worlds, loaded regions, tiled simulation spaces | More flexible, but needs reliable ownership and neighbor handling |
| Hierarchical grids | Very large or multi-scale worlds | Powerful, but easy to overbuild too early |
GridForge is designed around the most flexible foundation: conjoined grids inside explicit worlds.
That means you can start with a single grid, add neighboring grids as the world grows, remove inactive grids as regions unload, and build hierarchy above the library only when your game or simulation actually needs it.
What It Provides
- Explicit
GridWorldownership for isolated runtime state - Multiple active grids per world, with conjoined boundary neighbor lookup
- Deterministic fixed-point math through
FixedMathSharp - Fast world-space lookup through snapped bounds and a spatial hash
- Scan-cell overlays for efficient radius and occupant queries
- Region coverage through
GridTracer - Blocker and obstacle workflows for world-space blocked areas
- Occupant and partition extension points for gameplay or simulation metadata
- Allocation-conscious internals built on
SwiftCollectionspools and containers - Standard and lean package variants for different dependency needs
Install
dotnet add package GridForge
GridForge targets netstandard2.1 and net8.0.
Package Variants
GridForge is published in two build variants:
| Package | Use when |
|---|---|
GridForge |
You want the default package with MemoryPack, FixedMathSharp, and SwiftCollections. |
GridForge.Lean |
You want the same core voxel-grid API without the direct MemoryPack dependency, using FixedMathSharp.Lean and SwiftCollections.Lean. |
Install the lean package with:
dotnet add package GridForge.Lean
Source builds also expose matching configurations:
Releasebuilds the standardGridForgepackage.ReleaseLeanbuilds theGridForge.Leanpackage.
Unity-specific integration lives in the separate GridForge-Unity repository.
Quick Start
using System;
using FixedMathSharp;
using GridForge.Configuration;
using GridForge.Grids;
using GridWorld world = new GridWorld();
GridConfiguration configuration = new GridConfiguration(
new Vector3d(-10, 0, -10),
new Vector3d(10, 0, 10),
scanCellSize: 8);
if (!world.TryAddGrid(configuration, out ushort gridIndex))
throw new InvalidOperationException("Failed to add grid.");
VoxelGrid grid = world.ActiveGrids[gridIndex];
Vector3d position = new Vector3d(2, 0, -3);
if (world.TryGetGridAndVoxel(position, out VoxelGrid resolvedGrid, out Voxel voxel))
{
Console.WriteLine($"Grid: {resolvedGrid.GridIndex}");
Console.WriteLine($"Voxel: {voxel.Index}");
Console.WriteLine($"World position: {voxel.WorldPosition}");
}
The key mental model is:
- Create a
GridWorld. - Register one or more
VoxelGridinstances fromGridConfiguration. - Resolve world-space positions into grids and voxels.
- Layer scans, blockers, occupants, partitions, or higher-level systems on top.
- Reset or dispose the world when that simulation boundary is done.
Conjoined Grids And Dynamic Worlds
The library is built for worlds that grow, stream, and split responsibility cleanly:
- A small game can use one
GridWorldwith oneVoxelGrid. - A streamed world can load and unload grids around the player or active simulation area.
- A server can run multiple isolated
GridWorldinstances in one process. - A larger architecture can put sectors, planets, regions, or hierarchy above GridForge without reworking the voxel layer.
GridForge tracks world-local grid slots, grid spawn tokens, and WorldVoxelIndex values so systems can reason about identity even as grids are removed, reused, or replaced.
Core Concepts
| Concept | Role |
|---|---|
GridWorld |
Owns voxel size, spatial hashing, active grids, lifecycle, events, and top-level lookup for one isolated world. |
VoxelGrid |
Owns one grid's snapped bounds, voxels, scan cells, neighbor relationships, obstacle summary state, and versioning. |
Voxel |
Represents one snapped cell with obstacle, occupant, partition, boundary, and cached neighbor state. |
ScanCell |
Groups voxels into query buckets so radius scans can skip empty regions. |
GridTracer |
Converts lines and bounds into covered voxels or scan cells across the active grids in a world. |
BoundsBlocker |
Applies and removes obstacle state over traced world-space bounds. |
IVoxelOccupant |
Represents dynamic entities that can be registered, deregistered, and scanned. |
IVoxelPartition |
Attaches typed voxel-local metadata or behavior directly to a voxel. |
Documentation
Start with the wiki:
- Wiki Home
- Getting Started
- Core Concepts
- Common Workflows
- Architecture Overview
- Recipes
- FAQ and Troubleshooting
The source for those pages lives in docs/wiki.
Local Validation
dotnet restore GridForge.slnx
dotnet build GridForge.slnx --configuration Debug
dotnet test GridForge.slnx --configuration Debug --no-build
CI validates both Release and ReleaseLean on Ubuntu and Windows.
For benchmark discovery:
dotnet run --project tests/GridForge.Benchmarks/GridForge.Benchmarks.csproj -c Release -- list
Benchmarks are especially useful when changing pooling, tracing, grid registration, scan flow, or other allocation-sensitive paths.
Contributing
See CONTRIBUTING.md for contribution guidelines and workflow details.
When working on core behavior, keep the library deterministic, world-scoped, allocation-conscious, and free of engine-specific assumptions.
Community And Support
For questions, discussions, or general support, join the official Discord community:
For bug reports or feature requests, please open an issue in this repository.
License
GridForge is licensed under the MIT License. See LICENSE, NOTICE, and COPYRIGHT for details.
| 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 is compatible. 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
- FixedMathSharp (>= 4.0.0)
- MemoryPack (>= 1.21.4)
- SwiftCollections (>= 4.1.1)
- System.Text.Json (>= 10.0.7)
-
net8.0
- FixedMathSharp (>= 4.0.0)
- MemoryPack (>= 1.21.4)
- SwiftCollections (>= 4.1.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on GridForge:
| Package | Downloads |
|---|---|
|
Trailblazer
Deterministic, framework-agnostic pathfinding and navigation for lockstep simulations and games. Trailblazer combines FixedMathSharp fixed-point math, GridForge voxel navigation charts, A* paths, flow fields, reusable guide caching, transition-aware routing, steering, turning, locomotion, heightmaps, and Chronicler serialization support. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.6 | 103 | 5/30/2026 |
| 6.0.5 | 124 | 5/26/2026 |
| 6.0.4 | 149 | 5/19/2026 |
| 6.0.3 | 138 | 5/11/2026 |
| 6.0.2 | 104 | 5/7/2026 |
| 6.0.1 | 109 | 5/4/2026 |
| 6.0.0 | 118 | 4/25/2026 |
| 5.0.0 | 114 | 4/16/2026 |
| 4.0.0 | 108 | 4/8/2026 |
| 3.0.0 | 120 | 3/11/2026 |
| 2.0.0 | 236 | 7/2/2025 |
| 1.3.0 | 225 | 7/1/2025 |
| 1.2.0 | 223 | 6/26/2025 |
| 1.1.6 | 244 | 6/19/2025 |
| 1.1.5 | 220 | 6/19/2025 |
| 1.1.4 | 226 | 6/18/2025 |
| 1.1.3 | 226 | 6/17/2025 |
| 1.1.2 | 229 | 6/16/2025 |
| 1.1.1 | 232 | 6/14/2025 |
| 1.1.0 | 355 | 6/9/2025 |