MouseTrainer.Domain 1.0.0

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

MouseTrainer

Deterministic mouse dexterity trainer — precision, control, and flow.

Built on .NET 8 MAUI (Windows-first), with a fully deterministic fixed-timestep simulation, composable blueprint mutators, and platform-stable run identity.

NuGet Packages

Package Description
MouseTrainer.Domain Deterministic xorshift32 RNG, FNV-1a hashing, game events, and run identity primitives. Zero dependencies.
MouseTrainer.Simulation Fixed-timestep 60 Hz game loop with composable blueprint mutators, replay recording, and session management.
MouseTrainer.Audio Event-driven audio cue system with deterministic volume/pitch jitter, rate limiting, and asset verification.

Architecture

Four-module modular monolith. No cycles, no platform leakage into libraries.

MouseTrainer.Domain        --> (nothing)          Shared primitives, RNG, run identity
MouseTrainer.Simulation    --> Domain             Deterministic loop, modes, mutators, levels
MouseTrainer.Audio         --> Domain             Cue system, asset verification
MouseTrainer.MauiHost      --> all three          Composition root, MAUI platform host

See docs/modular.manifesto.md for the full dependency graph and constitutional rules.


Game Modes

ReflexGates

Side-scrolling gate challenge. Oscillating apertures on vertical walls — navigate the cursor through each gate before the scroll catches you. Deterministic seed → identical level every time.

  • Fixed 60 Hz timestep with accumulator-based catch-up
  • xorshift32 RNG seeded per run for platform-stable generation
  • FNV-1a 64-bit hashing for run identity (same seed + mode + mutators = same RunId everywhere)

Blueprint Mutators

Six composable transforms that reshape generated levels before play. Applied as an ordered fold over LevelBlueprint:

Mutator Key Params Effect
NarrowMargin pct ∈ [0,1] Scales aperture heights down — tighter gaps
WideMargin pct ∈ [0,1] Scales aperture heights up — more forgiving
DifficultyCurve exp ∈ [0.1,5] Remaps gate difficulty by index — front-load or back-load
RhythmLock div ∈ {2,3,4,6,8} Quantizes gate phases to N divisions — rhythmic patterns
GateJitter str ∈ [0,1] Deterministic vertical offset via sin() — spatial perturbation
SegmentBias seg, amt, shape Divides gates into acts with per-segment difficulty bias

Mutators are pure functions: LevelBlueprint → LevelBlueprint. They compose via pipeline (specs.Aggregate), are factory-resolved from MutatorRegistry, and their parameters are frozen into the RunId hash for reproducibility.

SegmentBias Shapes

  • Crescendo (shape=0): Easy start → hard finish. d = 2t - 1
  • Valley (shape=1): Hard middle, easy ends. d = 8t(1-t) - 1
  • Wave (shape=2): Alternating easy/hard segments. d = (-1)^k

Project Structure

src/
  MouseTrainer.Domain/          Leaf module — events, input, runs, RNG
    Events/                     GameEvent, GameEventType
    Input/                      PointerInput
    Runs/                       RunDescriptor, RunId, MutatorId/Spec/Param, ModeId, DifficultyTier
    Utility/                    DeterministicRng (xorshift32)

  MouseTrainer.Simulation/      Deterministic simulation engine
    Core/                       DeterministicLoop, FrameResult, IGameSimulation
    Debug/                      ISimDebugOverlay
    Levels/                     LevelBlueprint, ILevelGenerator, LevelGeneratorRegistry
    Modes/ReflexGates/          Gate, ReflexGateSimulation, ReflexGateGenerator, ReflexGateConfig
    Mutators/                   IBlueprintMutator, MutatorPipeline, MutatorRegistry, 6 mutators
    Session/                    SessionController, SessionModels

  MouseTrainer.Audio/           Audio cue system
    Assets/                     AssetManifest, AssetVerifier, IAssetOpener
    Core/                       AudioDirector, AudioCue, AudioCueMap, IAudioSink

  MouseTrainer.MauiHost/        MAUI composition root (Windows)

tests/
  MouseTrainer.Tests/           214 tests across 6 categories
    Architecture/               Dependency boundary enforcement
    Determinism/                Replay regression, RNG, session controller
    Levels/                     Generator extraction
    Mutators/                   Blueprint mutator correctness + composition
    Persistence/                Session store
    Runs/                       RunDescriptor golden hashes + identity

tools/
  MouseTrainer.AudioGen/        Audio asset generation tooling

docs/
  modular.manifesto.md          Dependency graph + constitutional rules
  MAUI_AssetOpener_Snippet.md   Platform asset wiring snippet

Build & Test

# Build simulation library (0 warnings, TreatWarningsAsErrors)
dotnet build src/MouseTrainer.Simulation/

# Run all 214 tests
dotnet test tests/MouseTrainer.Tests/

# Run MAUI host (Windows — use Visual Studio, set startup to MauiHost)

Key Design Principles

  • Determinism is constitutional. Same seed → same simulation → same score, always. No DateTime.Now, no Random, no platform-dependent floats in the hot path.
  • Modular monolith, not microservices. Four assemblies with enforced one-way dependencies. Domain is the leaf; MauiHost is the only composition root.
  • Protocol-grade identity. MutatorId, ModeId, RunId are permanent — once created, frozen forever. FNV-1a hashing with canonical parameter serialization.
  • Warnings are errors. Library projects use <TreatWarningsAsErrors>true</TreatWarningsAsErrors>. MAUI host opts out (SDK-generated warnings).

License

MIT

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.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on MouseTrainer.Domain:

Package Downloads
MouseTrainer.Simulation

Deterministic 60Hz fixed-timestep game simulation engine with accumulator-based loop, composable blueprint mutators, replay recording and verification, and session management. Platform-stable reproducibility via xorshift32 RNG.

MouseTrainer.Audio

Deterministic audio cue system for event-driven sound effects. Volume and pitch jitter via xorshift32 RNG, rate limiting, asset verification, and one-shot or looped playback.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.3 113 2/28/2026
1.1.2 105 2/27/2026
1.1.0 106 2/23/2026
1.0.0 110 2/12/2026