Gloam.Runtime 0.7.0

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

Gloam.Runtime

High-performance game host and runtime for Gloam roguelike engine

Overview

Gloam.Runtime provides the core runtime infrastructure for roguelike games, featuring a DryIoc-based dependency injection host, optimized game loop, scene management, and layer rendering services.

Features

  • Game Host: GloamHost with DryIoc container integration
  • Optimized Game Loop: High-precision timing with configurable render steps
  • Scene Management: Smooth scene transitions with easing effects
  • Layer Rendering: Priority-based layer system for complex rendering scenarios
  • Service Configuration: Comprehensive runtime configuration system

Quick Start

using Gloam.Runtime;
using Gloam.Runtime.Config;

// Create and configure the game host
var hostConfig = new GloamHostConfig
{
    RootDirectory = Directory.GetCurrentDirectory(),
    EnableConsoleLogging = true
};

await using var host = new GloamHost(hostConfig);

// Initialize and run
await host.InitializeAsync();
await host.RunAsync(new GameLoopConfig
{
    KeepRunning = () => true,
    RenderStep = TimeSpan.FromMilliseconds(16) // 60 FPS
});

Game Loop Architecture

The runtime implements a flexible game loop with precise timing:

  • Uses Stopwatch.GetTimestamp() for high-precision timing
  • Supports both real-time and turn-based gameplay modes
  • Integrated input polling with IInputDevice.Poll() and EndFrame()
  • Layer-based rendering with LayerRenderingManager.RenderAllLayersAsync()

Key Components

  • Host: GloamHost - Main application host with DI container
  • Configuration: GloamHostConfig, GameLoopConfig, RuntimeConfig
  • Scene Management: Scene registration and transition system
  • Layer Rendering: LayerRenderingManager for priority-based rendering

Performance Features

  • DryIoc Container: Optimized for high-frequency object creation
  • Memory Efficient: Minimal allocations during game loop
  • Service Lifetime: Proper scoping for game loop operations
  • High-Precision Timing: Frame timing utilities with nanosecond accuracy

Documentation

License

MIT License - see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
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
0.7.0 149 8/31/2025

Initial release with optimized game loop and layer rendering performance improvements.