GameTimer 5.0.8

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

GameTimer

A .NET library for hierarchical time management in games. Provides flexible clock objects that support pause, speed control, hit pause effects, and countdown timers.

Features

  • Hierarchical Time: Chain clocks together so child clocks inherit pause and speed states from parents
  • Pause Control: Pause any clock and all its descendants pause automatically
  • Speed Control: Speed up or slow down time with a multiplier that cascades to child clocks
  • Hit Pause: Freeze a clock temporarily for impact effects (common in fighting games)
  • Countdown Timers: Timer that counts down with built-in lerp interpolation for animations
  • MonoGame Integration: Updates directly from XNA/MonoGame GameTime

Quick Start

using GameTimer;
using Microsoft.Xna.Framework;

public class Game1 : Game
{
    private GameClock _mainClock;
    private GameClock _gameClock;

    protected override void Initialize()
    {
        _mainClock = new GameClock();
        _gameClock = new GameClock();
    }

    protected override void Update(GameTime gameTime)
    {
        // Update clock hierarchy
        _mainClock.Update(gameTime);
        _gameClock.Update(_mainClock);

        // Pause gameplay (menu animations on _mainClock continue)
        _gameClock.Paused = true;

        // Slow motion
        _gameClock.TimerSpeed = 0.5f;
    }
}

Classes

Class Description
GameClock Base clock with pause and speed control
CountdownTimer Counts down from a duration with lerp support
HitPauseClock Freezes temporarily for impact effects
TimeUpdater Tracks time outside of XNA/MonoGame

Hierarchical Time

Clocks can update from other clocks, creating parent-child relationships:

         MainClock (real time)
             |
         GameClock (pauseable)
        /    |    \
  Player  Particles  Enemy
mainClock.Update(gameTime);
gameClock.Update(mainClock);
playerClock.Update(gameClock);

// Pausing gameClock pauses playerClock too
gameClock.Paused = true;

Documentation

Full documentation and sample project: GitHub Repository

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

    • No dependencies.

NuGet packages (14)

Showing the top 5 NuGet packages that depend on GameTimer:

Package Downloads
MenuBuddy

A complete MonoGame library for building menu systems and managing game state transitions

FontBuddy

Simple, flexible text rendering for MonoGame with built-in effects and easy justification.

FlashCards

MonoGame library for making little flashcard games

RenderBuddy

MonoGame library to simplify drawing normal-mapped images

ParticleBuddy

A very simple particle engine for Monogame projects

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.8 103 1/25/2026
5.0.7 78 1/25/2026
5.0.6 792 9/13/2025
5.0.5 131 9/13/2025
5.0.4 129 9/13/2025
5.0.3 136 9/13/2025
5.0.1 160 9/13/2025
4.0.0 1,680 7/5/2023
2.4.0 2,136 6/9/2023
2.3.0 1,944 11/1/2021
2.2.0 2,023 1/11/2021
2.1.0 2,049 9/9/2020
2.0.0 3,099 10/23/2018
1.0.8 2,946 2/3/2018
1.0.7 2,878 1/23/2018
1.0.6 2,789 1/20/2018
1.0.5 2,601 1/12/2018
1.0.4 2,592 10/18/2017
1.0.3 2,642 10/3/2017
1.0.2 2,561 9/19/2017
1.0.1 4,057 4/23/2016