game-loop-and-time

game-loop-and-time is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 50 tokens per session (1,746 once invoked), scanned A, original, Apache-2.0.

A game timing design that separates the variable render frame from the fixed simulation step. It covers delta-scaled movement, interpolation, pause and time scale, and deterministic updates.

In plain words
What is it for?
Use it for movement, animation, countdowns, physics, and other time-based simulation. It helps decide whether code belongs in a per-frame or fixed-step callback for the game engine.
Why use it?
It prevents movement from depending on computer speed and reduces physics tunnelling, jitter, and multiplayer desynchronisation. Each task runs on the clock suited to it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for movement, animation, countdowns, physics, and other time-based simulation. It helps decide whether code belongs in a per-frame or fixed-step callback for the game engine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/game-loop-and-time
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add makifbaysal/tasktrooper --skill game-loop-and-time
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for game-loop-and-time

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/game-loop-and-time/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/game-loop-and-time)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/game-loop-and-time"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/game-loop-and-time/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for game-loop-and-time

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/game-loop-and-time"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/game-loop-and-time.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01746
Opus 5.5 $0.00020 $0.00698
Sonnet 5.5 $0.00010 $0.00349
Haiku 4.5 $0.00005 $0.00175

Measured 4d ago against content hash 7fc25dddd44f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

game-loop-and-time scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

catalog/agents/game-developer/skills/game-loop-and-time/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Game Loop and Time

Overview

Two clocks run in every game: the render frame (variable, as fast as the machine allows) and the simulation step (fixed, so physics and rules behave the same everywhere). Most "it moves faster on my machine", tunnelling, jitter and desync bugs come from putting work on the wrong clock or forgetting to scale by the right delta.

Core principle: Simulate on a fixed step, render with interpolation, and scale every time-based value by the delta of the clock it runs on.

Where each clock lives

Engine Per frame (variable) Fixed step Default fixed rate
Unity Update, LateUpdate — Time.deltaTime FixedUpdate — Time.fixedDeltaTime 0.02 s (50 Hz)
Godot _process(delta) _physics_process(delta) 60 ticks/s (physics/common/physics_ticks_per_second)
Unreal Tick(DeltaSeconds) physics substepping / async physics tick project physics settings
Bevy Update — Res<Time> FixedUpdate — Res<Time> is Time<Fixed> there 64 Hz
Phaser update(time, delta) (ms) Arcade physics' own step (fps, fixedStep) 60
PixiJS 8 ticker.add(t => …) — t.deltaMS your accumulator —
three.js / Babylon.js setAnimationLoop + THREE.Timer / engine.getDeltaTime() (ms) your accumulator, or the physics plugin's —
MonoGame Update(GameTime) IsFixedTimeStep = true (default) 1/60 s
pygame dt = clock.tick(60) / 1000 your accumulator —

Use the engine's fixed callback for physics and authoritative rules. Write your own loop only where the engine has none (web renderers, pygame, custom servers).

The accumulator loop (web, pygame, servers)

const STEP = 1 / 60;
const MAX_FRAME = 0.25;           // clamp: a 3 s tab-switch must not run 180 steps
let acc = 0;
let last = performance.now();

function frame(now: number) {
  const frameTime = Math.min((now - last) / 1000, MAX_FRAME);
  last = now;
  acc += frameTime;
  while (acc >= STEP) {
    previous.copyFrom(current);   // keep the last state for interpolation
    simulate(current, STEP);      // rules + physics, fixed dt only
    acc -= STEP;
  }
  render(interpolate(previous, current, acc / STEP));
  requestAnimationFrame(frame);
}
requestAnimationFrame(frame);

Read the full file on GitHub · 128 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 128 lines · 50 tokens per session scan A 7fc25dddd44f

Subscribe to this mod's changes

game-loop-and-time is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 50 tokens to every session and 1,746 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-09.