Gravitas 2.0.1

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

Gravitas

Gravitas icon

Deterministic fixed-point physics for lockstep games and simulations.

Build Coverage NuGet API License Discord

Gravitas gives .NET simulations a physics runtime that can replay the same inputs into the same results. It combines fixed-point 2D, 3D, and explicit mixed-dimension physics with context-owned worlds, stable collision ordering, continuous collision detection, queries, constraints, replay hashes, and renderer-neutral diagnostics.

Why Gravitas?

  • Lockstep by design. Authoritative physics uses deterministic fixed-point math and explicit fixed-frame phases.
  • One runtime, three paths. Run pure 2D, pure 3D, both side by side, or deliberate 2D/3D contacts through mixed mode.
  • A complete collision stack. Build with primitives, convex and concave meshes, compounds, materials, manifolds, response islands, CCD, joints, and ragdolls.
  • Continuous static environments. Declare exact continuity between bounded mesh or planar pieces while retaining collider identities, materials and spatial partitions. See static surfaces.
  • No engine lock-in. Hosts provide transforms and lifecycle calls through a small adapter boundary; Gravitas owns no renderer, scene graph, or ECS.
  • Tools without hidden state. Context-local queries, replay hashes, diagnostic events, and debug-draw commands make simulation behavior visible without changing it.

Runtime geometry follows an explicit supported size contract: an inclusive 4,096-unit conservative reach per collider or context query source, independent of world position and travel distance.

Install

dotnet add package Gravitas

Prefer the dependency-light serialization profile?

dotnet add package Gravitas.Lean
Package Profile
Gravitas Standard package with built-in MemoryPack support
Gravitas.Lean Same core physics API without the direct MemoryPack runtime dependency

Both packages target netstandard2.1 and net10.0.

The Core Loop

Gravitas makes simulation ownership visible. A host owns commands and timing; one GravitasWorldContext owns the physics world and all of its runtime services.

using Gravitas;

using GravitasWorldContext context = GravitasWorldContext.CreateOwned();
context.SetFrameRate(60);

// Configure GridForge coverage, then bind host agents, bodies, and colliders.
// Apply the frame's deterministic commands before advancing physics.
context.Simulate();
context.LateSimulate();

var replayHash = context.ComputeReplayHash();

// Presentation is separate from authoritative simulation state.
context.Visualize();
context.LateVisualize();

The full Getting Started guide creates the grid, host adapter, collider, and dynamic body behind that loop.

What You Can Build

Area Highlights
3D physics Dynamic, kinematic, and static bodies; primitive, mesh, and compound colliders; grounding; CCD; constraints; ragdolls
2D physics First-class X/Z planar bodies, angular response, compounds, support detection, CCD, constraints, and ragdolls
Mixed physics Finite 2D slabs embedded in 3D, cross-dimension contacts, constrained response, queries, CCD, and diagnostics
Queries Closest-hit, all-hit, overlap, raycast, swept-shape, cone-volume, mixed, and batch APIs
Determinism Stable runtime ownership, replay hashes, explicit serialization boundaries, and caller-owned hot-path buffers

Shared logging and exception guards come from the independent Chronicler.Diagnostics package. See the migration guide for the updated imports and guard names.

Documentation

  • Getting Started — build and step your first world.
  • Guides — understand host integration, dimensions, collisions, queries, replay, and diagnostics.
  • Workload and Tuning — set a host tick budget and compare first-use and warmed workload costs.
  • API Reference — browse public namespaces, types, and members.
  • Coverage Report — inspect the current test-suite coverage.
  • Migration Guide — update body mass access, Chronicler imports, clock consumers, and persisted timing data across intentional contract changes.
  • Contributing — build, test, and prepare a focused change.

Built On The LSF Stack

Gravitas is the physics layer in a modular deterministic simulation stack:

Library Responsibility
FixedMathSharp Fixed-point scalars, transforms, and full-domain geometry
SwiftCollections Low-allocation collections, pools, and spatial structures
GridForge Explicit voxel worlds, traversal, and partition backing
Chronicler Deterministic state transfer, wide timing, and replay

Contributing

Contributions are welcome. Start with CONTRIBUTING.md; the deeper deterministic, physics, testing, and performance rules live in AGENTS.md.

For questions and discussion, join the community on Discord.

License

Gravitas is available under the MIT License. See NOTICE and COPYRIGHT for attribution 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 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 is compatible.  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
2.0.1 47 11/14/2026
2.0.0 52 11/12/2026
1.0.0 181 8/6/2026
1.0.0-alpha.1 101 8/5/2026