FS.GG.Game.Core 0.3.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package FS.GG.Game.Core --version 0.3.0
                    
NuGet\Install-Package FS.GG.Game.Core -Version 0.3.0
                    
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="FS.GG.Game.Core" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FS.GG.Game.Core" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="FS.GG.Game.Core" />
                    
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 FS.GG.Game.Core --version 0.3.0
                    
#r "nuget: FS.GG.Game.Core, 0.3.0"
                    
#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 FS.GG.Game.Core@0.3.0
                    
#: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=FS.GG.Game.Core&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=FS.GG.Game.Core&version=0.3.0
                    
Install as a Cake Tool

FS.GG.Game.Core

BCL-only deterministic simulation core for FS.GG.Game — the platform's bottom layer. Depends on nothing but FSharp.Core and reaches up to no other FS-GG package.

The sim vocabulary

The shared types — Point, Rect, Circle, ConvexPolygon, and the two detection values Contact (a penetration manifold) and RayHit (a segment-cast result) — live directly in the FS.GG.Game.Core namespace, so open FS.GG.Game.Core is all a caller needs. The tile index Cell is namespace-level too. Everything below is a [<RequireQualifiedAccess>] module, called as Grids.cellAt, Rng.nextInt, and so on.

  • Rng — SplitMix64 seeded RNG (ofSeed/nextInt/nextFloat/nextBool/split), byte-identical across runs.
  • FixedStep — fixed-timestep accumulator drain (drain/drainWith). No wall-clock read, so a scripted frame time replays exactly.

Collision — detection, then response

  • Geometry — the detection surface: overlap and containment for AABB, circle, and convex polygon (intersects/contains/aabbContact/circleContact/polygonContact/obbPolygon), swept tests (sweptIntersects), and segment casts (segmentAabbHit/segmentCircleHit/segmentPolygonHit/…). It returns manifests as values and never resolves them.
  • Resolution — the response layer that consumes a detection Contact and produces transforms (pushOut/slide/knockback). Deliberately separate from detection; it never re-detects.
  • SpatialGrid — uniform spatial partitioning for the broad phase (build/query/queryRadius).

The grid

  • Pathfinding — grid A*/BFS over walkable cells (astar/bfs), plus the many-to-one AI substrate distanceField/flowField/reachableWithin.
  • Grids — the parts of a square grid: Edge, Vertex, GridSpec, the six adjacency conversions, and the pixel↔cell map (cellRect/cellCenter/edgeSegment/cellAt). Names the boundary between two tiles, which is where a wall lives.

Sight

  • Los — point-to-point grid line of sight over a caller-supplied opacity predicate (line/supercover/trace/lineOfSight).
  • Fov — grid field of view by symmetric shadowcasting (fov). Opacity is not walkability: this module consults opacity only.
  • Visibility — the continuous-space sibling: exact point-to-point sight against arbitrary occluder segments, and the full angular-sweep visibility polygon (raySegment/isVisible/polygon). It can answer occlusion between two moving bodies, which a tile walk cannot.

Pathfinding, Los, and Fov all take terrain as a pure Cell -> bool predicate — the framework holds no map, so one terrain plugs into all three.

Where it came from

Three provenances:

  • Extracted from FS.GG.UI.Canvas / FS.GG.UI.Scene and reimplemented BCL-only, per ADR-0022 — the shared types, Geometry, Rng, FixedStep, Pathfinding, SpatialGrid.
  • Promoted from the frozen starter fragments in FS.GG.Rendering (template/fragments/*), which every game that wanted them previously had to copy and diverge from — Los, Visibility, Grids.
  • Authored here through the SDD lifecycle, because the org had nothing to promote — Fov, Resolution.

Guarantees

Headlessly testable — zero Skia, zero Scene. Purity, totality (degenerate and non-finite input degrades to a documented value rather than throwing), and determinism (integer logic / float presentation) are the contract each module's .fsi states and its tests hold it to — so identical input yields byte-identical output across runs and platforms, and a module is safe to call from a replayed simulation step.

To project sim state onto drawables, add FS.GG.Game.Render.

House style: .fsi is the sole public surface; net10.0; -preview channel. See FS-GG/FS.GG.Game and ADR-0022.

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

NuGet packages (2)

Showing the top 2 NuGet packages that depend on FS.GG.Game.Core:

Package Downloads
FS.GG.Game.Render

Pure Scene adapter and input policy for FS.GG.Game — projects FS.GG.Game.Core simulation primitives (Point/Rect/Cell and pathfinding routes) onto FS.GG.UI.Scene drawables at the render edge, and ships the default command→key keymap binding the Game.Core command vocabulary onto FS.GG.UI.KeyboardInput's keymap mechanism. Reaches UP to FS.GG.UI.*; no Skia, deterministic. Per ADR-0022 §2.

FS.GG.Game.Harness

Deterministic, headless gameplay test harness on FS.GG.Game.Core. Drives a game's world through the standard Command input frontier — scripted raw-key→keymap→Command, an in-process Bot policy, and a multi-seed bot-vs-bot matrix — folds whole fixed steps, and fingerprints the world trace as a value so a replay is a comparison, not a tolerance check. A typed synthetic-state escape hatch keeps its own evidence self-identifying. Depends on nothing but FS.GG.Game.Core and the BCL.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.0 0 7/22/2026
0.8.0 45 7/21/2026
0.7.1 336 7/19/2026
0.7.0 96 7/19/2026
0.6.0 96 7/19/2026
0.5.1 139 7/18/2026
0.5.0 728 7/16/2026
0.4.0 1,542 7/11/2026
0.3.0 2,230 7/10/2026
0.2.0 196 7/9/2026
0.1.0-preview.1 360 7/6/2026