NeoKolors.Tui.Lifecycle.Core 2026.4.0-preview.4

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

NeoKolors.Tui.Lifecycle.Core

Build & Test NuGet Version NuGet Downloads License

NeoKolors.Tui.Lifecycle.Core provides the core lifecycle management, frame timing, deterministic time-step accumulation, and scene management for NeoKolors applications and games.


Core Primitives

1. State Machine (ILifecycle & LifecycleController)

The LifecycleController manages execution states:

  • INITIALIZED: Application created, ready to start.
  • RUNNING: Main execution and render loop active.
  • PAUSED: Execution suspended (e.g. window minimized or backgrounded).
  • STOPPED: Application terminated and resources cleaned up.
using NeoKolors.Tui.Lifecycle.Core;

var controller = new LifecycleController();
controller.StateChanged += (sender, e) => {
    Console.WriteLine($"Lifecycle changed: {e.OldState} -> {e.NewState}");
};

controller.Start();
// ...
controller.Pause();
// ...
controller.Resume();
// ...
controller.Stop();

2. High-Precision Frame Timing (FrameClock)

FrameClock calculates exact delta time between ticks, monitors frame rates, and computes smoothed FPS averages:

using NeoKolors.Tui.Lifecycle.Core;

var clock = new FrameClock();
clock.Start();

while (isRunning) {
    DeltaTime dt = clock.Tick();
    
    double fps = clock.FramesPerSecond;
    double smoothedFps = clock.SmoothedFps;
    long totalFrames = clock.TotalFrames;
}

3. Deterministic Physics (FixedTimestepAccumulator)

When developing games or deterministic animations, render frame rates may fluctuate while physics/logic must run at an exact constant interval (e.g. 60 Hz). FixedTimestepAccumulator consumes variable frame delta times and executes exact fixed updates:

using NeoKolors.Tui.Lifecycle.Core;

var accumulator = new FixedTimestepAccumulator(targetTps: 60);

// Inside your main loop:
accumulator.Accumulate(variableDeltaTime);

while (accumulator.ShouldUpdate()) {
    // Exactly 1/60th second step:
    physicsWorld.Step(accumulator.FixedDeltaTime);
}

// Alpha blend factor for interpolation between physics frames:
double alpha = accumulator.Alpha;

4. Scene Stack (SceneStack & IScene)

Manages multi-screen applications and game states (e.g. Main Menu, Settings, Gameplay, Game Over):

using NeoKolors.Tui.Lifecycle.Core;

var sceneStack = new SceneStack();
sceneStack.Push(new MainMenuScene());

// Transition to new game:
sceneStack.Push(new GameplayScene());

// Return to menu:
sceneStack.Pop();
Product 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 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on NeoKolors.Tui.Lifecycle.Core:

Package Downloads
NeoKolors.Tui.Lifecycle.Game2D

Package Description

NeoKolors.Tui.Lifecycle.Apps

Package Description

NeoKolors.Tui.Widgets

Package Description

NeoKolors.Tui.Lifecycle.Game3D

Package Description

NeoKolors.Tui.Lifecycle.Inline

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.4.0-preview.4 76 11/15/2026
2026.4.0-preview.3 88 11/1/2026
2026.4.0-preview.2 77 10/30/2026
2026.4.0-preview.1 86 10/23/2026