GridForge 1.1.1
dotnet add package GridForge --version 1.1.1
NuGet\Install-Package GridForge -Version 1.1.1
<PackageReference Include="GridForge" Version="1.1.1" />
<PackageVersion Include="GridForge" Version="1.1.1" />
<PackageReference Include="GridForge" />
paket add GridForge --version 1.1.1
#r "nuget: GridForge, 1.1.1"
#addin nuget:?package=GridForge&version=1.1.1
#tool nuget:?package=GridForge&version=1.1.1
GridForge
A high-performance, deterministic voxel grid system for spatial partitioning, simulation, and game development.
Lightweight, framework-agnostic, and optimized for lockstep engines.
๐ Key Features
- Voxel-Based Spatial Partitioning โ Build efficient 3D voxel grids with fast access & updates.
- Deterministic & Lockstep Ready โ Designed for synchronized multiplayer and physics-safe environments.
- ScanCell Overlay System โ Accelerated proximity and radius queries using spatial hashing.
- Dynamic Occupancy & Obstacle Tracking โ Manage moving occupants, dynamic obstacles, and voxel metadata.
- Minimal Allocations & Fast Queries โ Built with SwiftCollections and FixedMathSharp for optimal performance.
- Framework Agnostic โ Works in Unity, .NET, lockstep engines, and server-side simulations.
- Multi-Layered Grid System โ Dynamic, hierarchical, and persistent grids.
โ Why GridForge?
GridForge is built for developers who need deterministic, high-performance, and framework-agnostic spatial grids. Whether you're building a lockstep multiplayer game, a server-driven simulation, or a high-fidelity physics system, GridForge provides the tools to manage voxelized spatial data with predictable and efficient results โ all without relying on any specific engine.
๐ฆ Installation
Non-Unity Projects
- Install via NuGet:
dotnet add package GridForge
- Or Download/Clone:
git clone https://github.com/mrdav30/GridForge.git
- Include in Project:
- Add
GridForge
to your solution or reference its compiled DLL.
- Add
Unity
GridForge is maintained as a separate Unity package. For Unity-specific implementations, refer to:
๐ GridForge-Unity Repository.
๐งฉ Dependencies
GridForge depends on the following libraries:
These dependencies are automatically included when installing.
๐ Library Overview
๐ Core Components
| Component | Description |
|-----------|------------|
| GlobalGridManager
| Manages VoxelGrids, global spatial queries, and grid registration. |
| VoxelGrid
| Represents a single grid containing voxels & scan cells. |
| Voxel
| Represents a voxel cell with occupant, obstacle, and partition data.. |
| ScanCell
| Handles spatial indexing for fast neighbor and radius queries.. |
| GridTracer
| Trace lines, areas, and paths across voxels and scan cells. |
| GridObstacleManager
| Manage dynamic grid obstacles at runtime.. |
| GridOccupantManager
| Manage and query occupants in voxels. |
| ScanManager
| Optimized scan queries (radius, box, path, etc). |
| Blockers
| Define static or dynamic voxel blockers. |
| Partitions
| Adds meta-data and custom logic to voxels. |
๐ Usage Examples
๐น Creating a Grid
GridConfiguration config = new GridConfiguration(new Vector3d(-10, 0, -10), new Vector3d(10, 0, 10));
GlobalGridManager.TryAddGrid(config, out ushort gridIndex);
๐น Querying a Grid for Voxels
Vector3d queryPosition = new Vector3d(5, 0, 5);
if (GlobalGridManager.TryGetGridAndVoxel(queryPosition, out VoxelGrid grid, out Voxel voxel))
Console.WriteLine($"Voxel at {queryPosition} is {(voxel.IsOccupied ? "occupied" : "empty")}");
}
๐น Adding a Blocker
BoundingArea blockArea = new BoundingArea(new Vector3d(3, 0, 3), new Vector3d(5, 0, 5));
Blocker blocker = new Blocker(blockArea);
blocker.ApplyBlockage();
๐น Attaching a Partition to a Voxel
if (GlobalGridManager.TryGetGrid(queryPosition, out VoxelGrid grid, out Voxel voxel))
{
PathPartition partition = new PathPartition();
partition.Setup(voxel.GlobalVoxelIndex);
voxel.AddPartition(partition);
}
๐น Scanning for Nearby Occupants
Vector3d scanCenter = new Vector3d(0, 0, 0);
Fixed64 scanRadius = (Fixed64)5;
foreach (IVoxelOccupant occupant in ScanManager.ScanRadius(scanCenter, scanRadius))
{
Console.WriteLine($"Found occupant at {occupant.WorldPosition}");
}
๐งช Testing and Validation
GridForge includes comprehensive unit tests.
Run tests with:
dotnet test
๐ Compatibility
- .NET Framework 4.7.2+
- .NET Core / .NET 6+
- Unity 2020+ (via - GridForge-Unity.)
- Supports FixedMathSharp for deterministic precision
- Supports SwiftCollections for optimal performance
๐ License
This project is licensed under the MIT License - see the LICENSE
file for details.
๐ฅ Contributors
- David Oravsky - Lead Developer
- Contributions Welcome! Open a PR or issue.
๐ง Contact
For questions or support, open an issue on GitHub.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.