GridForge.Lean 6.0.3

dotnet add package GridForge.Lean --version 6.0.3
                    
NuGet\Install-Package GridForge.Lean -Version 6.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="GridForge.Lean" Version="6.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GridForge.Lean" Version="6.0.3" />
                    
Directory.Packages.props
<PackageReference Include="GridForge.Lean" />
                    
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 GridForge.Lean --version 6.0.3
                    
#r "nuget: GridForge.Lean, 6.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 GridForge.Lean@6.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=GridForge.Lean&version=6.0.3
                    
Install as a Cake Addin
#tool nuget:?package=GridForge.Lean&version=6.0.3
                    
Install as a Cake Tool

GridForge

GridForge Icon

.NET CI Coverage NuGet NuGet Downloads License Frameworks

GridForge is a deterministic, high-performance voxel-grid library for spatial partitioning, simulation, and game-development workflows.

The core unit is an explicit GridWorld. That lets you run multiple isolated worlds in one process without leaking grid registration, tracing, blockers, occupants, or scan queries across world boundaries.

Install

dotnet add package GridForge

GridForge targets netstandard2.1 and net8.0.

Package Variants

GridForge is published in two build variants so you can choose between built-in MemoryPack support and a leaner dependency set:

  • GridForge
    Includes MemoryPack and depends on the standard FixedMathSharp and SwiftCollections packages. This is the best default choice for most .NET applications.
  • GridForge.Lean
    Excludes the MemoryPack package, swaps to FixedMathSharp.NoMemoryPack and SwiftCollections.Lean, and uses internal shim attributes so the same source can compile without the dependency. Choose this when you do not need built-in MemoryPack serialization, when you prefer a different serializer, or when you want the leanest dependency surface.

Both variants expose the same core voxel-grid API. The main difference is whether MemoryPack and the standard dependency chain are included.

Install via NuGet:

  • Standard package:

    dotnet add package GridForge
    
  • Lean package:

    dotnet add package GridForge.Lean
    

If you build from source, the repository also provides matching release configurations:

  • Release builds the standard GridForge package and release archives.
  • ReleaseLean builds the GridForge.Lean package and release archives.

Unity

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(
    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(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}");
}

Key ideas:

  • GridWorld owns runtime state such as voxel size, spatial hash size, active grids, tracing, blocker reactivity, and world-space lookup.
  • VoxelGrid is world-local. GridIndex is unique only within its owning world.
  • WorldVoxelIndex is the cross-system identity for a voxel and includes world scope.

Why Explicit Worlds

Having GridWorld own world state makes it practical to build:

  • multi-world simulations with overlapping local coordinates
  • streamed loading and unloading without cross-world state leakage
  • save and load flows keyed by world identity
  • higher-level orchestration such as galaxies, sectors, or planet registries above the library

Start With The Wiki

Local Validation

dotnet restore GridForge.slnx
dotnet build GridForge.slnx --configuration Debug
dotnet test GridForge.slnx --configuration Debug --no-build

For benchmark discovery:

dotnet run --project tests/GridForge.Benchmarks/GridForge.Benchmarks.csproj -c Release -- list

Contributing

See CONTRIBUTING.md for contribution guidelines and workflow details.

Community & Support

For questions, discussions, or general support, join the official Discord community:

👉 Join the Discord Server

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.3 46 5/11/2026
6.0.2 76 5/7/2026
6.0.1 90 5/4/2026
6.0.0 98 4/25/2026