Agent skill

Godot Game Loop Time Trial

by thedivergentai in thedivergentai/GD-Agentic-Skills

Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4.

LGPL-3.0Auto-check passedGame Development

Install Godot Game Loop Time Trial

skills CLI
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-time-trial -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thedivergentai/GD-Agentic-Skills godot-game-loop-time-trial --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot-game-loop-time-trial .claude/skills/godot-game-loop-time-trial && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
godot-game-loop-time-trial
GitHub stars
821
Token cost
~3.1k tokens
SKILL.md length
1,118 words
Files
9 (incl. scripts, references)
Skills in repo
98
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4.

  • Works in 4 steps: Robust Checkpoint Validation → Space-Efficient Ghosting → Delta-Compression for Ghosts → …
  • Building racing games
  • SKILL.md covers Architectural Thinking: The…, Expert Code Patterns, Master Decision Matrix: Data… and NEVER Do, plus 4 more sections
  • Speed-run platformers

What it does

Godot Game Loop Time Trial is an agent skill from thedivergentai/GD-Agentic-Skills. Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4. Use when building racing games, speed-run platformers, or arcade trials.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `references/migration-notes.md` and `references/time-trial-expert-patterns.md`).

It sits in Game Development, covering Game development and Game design. It works with Godot. The repository describes itself as: The official "Long-Term Memory" for Godot 4.7+ AI Agents. A high-density library of 99 expert skills and 27 genre blueprints, providing audited, strictly typed GDScript patterns… The licence is LGPL-3.0.

When your agent uses it

  • Building racing games
  • Speed-run platformers

Example prompts

  • “/godot-game-loop-time-trial”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Robust Checkpoint Validation
  2. Space-Efficient Ghosting
  3. Delta-Compression for Ghosts
  4. The Leaderboard Bridge

What it can do on your machine

Read from SKILL.md and the folder at commit 4c4d0ff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.godotengine.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Godot Game Loop Time Trial loads about 3.1k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 50 tokens; SKILL.md has 1,118 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from thedivergentai/GD-Agentic-Skills at commit 4c4d0ff, republished under its LGPL-3.0 licence (© thedivergentai). 1,118 words, ~3,150 tokens.

Download SKILL.mdSave it as .claude/skills/godot-game-loop-time-trial/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
godot-game-loop-time-trial
description
Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4. Use when building racing games, speed-run platformers, or arcade trials.

Architectural Thinking: The "Validation-Chain" Pattern

A Master implementation treats Time Trials as a State-Validated Sequence. Recording a time is easy; ensuring the player didn't cheat via shortcuts requires a strictly ordered CheckpointManager.

Core Responsibilities
  • TimeTrialManager: The central clock. Validates checkpoint order and handles "Best Lap" logic.
  • GhostRecorder: Captures high-frequency transform data. Uses delta-time timestamps for frame-independent playback.
  • Checkpoint: Spatial triggers that notify the Manager.

Expert Code Patterns

1. Robust Checkpoint Validation

Prevent "Shortcut Cheating" by requiring checkpoints to be cleared in numerical order.

Wire Area body_entered (physics) → TimeTrialManager.pass_checkpoint(index). The manager owns usec timing — see script.

2. Space-Efficient Ghosting

Sample at a fixed rate (e.g. 10 Hz). Lerp position; slerp Quaternion rotation (ghost_recorder.gd / ghost_replayer.gd). Never Euler-lerp ghost heading.

Master Decision Matrix: Data Storage

FormatBest ForImplementation
Dictionary ArrayPrototypingSimple [{t: 0.1, p: pos}, ...]
Typed ArrayPerformancePackedVector3Array for positions.
JSON/BinarySavingFileAccess.get_var() to save ghost files.

NEVER Do

  • NEVER use OS.get_ticks_msec() for ultra-precise race timing — Millisecond resolution is too coarse for high-end racing games. Use Time.get_ticks_usec() for microsecond precision.
  • NEVER rely exclusively on _process() for finish line triggers — Visual frames can skip during lag. Always evaluate physical overlaps in _physics_process() to guarantee detection within the fixed physics step.
  • NEVER evaluate Area3D overlaps immediately after instantiation — The physics server requires at least one physics frame to synchronize. await get_tree().physics_frame before checking for players.
  • NEVER scale a CollisionShape3D on a checkpoint non-uniformly — This breaks the underlying SAT collision math. Always scale the internal shape resource (e.g., BoxShape3D.size) instead.
  • NEVER use TCP (reliable) for syncing positions in multiplayer racing — Congestion algorithms cause huge spikes. Use ENetMultiplayerPeer with TRANSFER_MODE_UNRELIABLE for high-frequency position updates.
  • NEVER trust client-side finish line/lap crossing — Always validate triggers on the authoritative server using multiplayer.is_server() to prevent cheating.
  • NEVER use standard float equality (==) for record lap times — Use is_equal_approx() to account for precision loss in accumulated time variables.
  • NEVER hardcode input checks without flushing the buffer — For frame-perfect boost/stop responses, call Input.flush_buffered_events() to ensure the engine has processed the latest raw input.
  • NEVER allocate new Vector3 arrays inside fast path-following loops — This triggers the garbage collector. Use PackedVector3Array to maintain a contiguous memory block.
  • NEVER use dynamic string paths ($"../Checkpoint") in tight loops — Lookups are slow. Use @onready to cache node references during initialization.
  • NEVER record the whole player object for ghosts — Only record core transforms (position/rotation). Recording the whole object is memory-intensive and unnecessary for visual ghosts.
  • NEVER give the ghost collision — It should be a purely visual indicator (e.g., semi-transparent) to avoid disrupting the player's line.
  • NEVER neglect checkpoint sequencing — Don't just check if the player hit the finish line. Verify they passed every intermediate checkpoint in the correct order.
  • NEVER use Area3D without monitoring optimization — Checkpoints should only look for the Player physics layer to minimize the number of physics overlap calculations.
  • NEVER use standard lerp for ghost rotation — Use slerp() or Quaternion.slerp() to avoid gimbal lock and ensure smooth rotation interpolation.

Available Scripts

MANDATORY: Follow the golden path order. Read each listed script before coding that stage.

Golden path (MANDATORY)
  1. time_trial_manager.gd — microsecond (Time.get_ticks_usec) or physics-frame clock; pass_checkpoint only from physics overlaps / Area signals
  2. Checkpoint Areas — ordered indices into the manager (physics frame, not _process)
  3. ghost_recorder.gd — samples {t, p, q} with Quaternion rotation
  4. ghost_replayer.gd — position lerp + Quaternion slerp (never Euler lerp)
  5. time_trial_leaderboard_bridge.gd — integer usec/msec → UI strings
Script index
time_trial_patterns.gd

10 Expert patterns: Microsecond timing, server-authoritative validation, rubber-banding AI, and frame-perfect input flushing.

time_trial_manager.gd

Central clock. Accumulates Time.get_ticks_usec() (or physics-frame counts). Finish checks must come from physics overlaps.

ghost_recorder.gd

Captures transform samples with Quaternion "q" fields for slerp-safe playback.

ghost_replayer.gd

MANDATORY with recorder. Replays samples via position lerp + Quaternion.slerp.

time_trial_playback_buffer.gd

Jitter-buffer for smooth ghost playback during network streaming.

time_trial_leaderboard_bridge.gd

Formatting utility for converting raw time data to human-readable strings.


Expert Time Trial Patterns

1. Delta-Compression for Ghosts

Store a keyframe only when position/rotation changes beyond a threshold. Persist with FileAccess.open_compressed() + ZSTD; prefer binary floats over JSON.

2. The Leaderboard Bridge

Store records as int usec/msec. Format with %02d:%02d.%03d for stable UI (e.g. 01:24.450).

Show full SKILL.md (448 more words)Show less

Expert knowledge (on demand)

LLM-ignorance rule: If a general agent would not know it before reading, load the reference — never delete expert deltas.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation
  • Time — get_ticks_usec() for microsecond lap clocks when OS.get_ticks_msec() is too coarse for race records.
  • Idle and Physics Processing — why finish-line and checkpoint overlap must run in _physics_process, not visual _process frames that can skip under load.
  • Area3D — monitoring, collision masks, and body_entered for ordered checkpoint gates without scanning every physics body.
  • Collision shapes (3D) — scale shape resources (BoxShape3D.size) instead of non-uniform CollisionShape3D scale so SAT stays valid on gates.
  • Using transforms — global position/basis capture for ghost samples and why Euler-only storage needs careful replay conversion.
  • Quaternion — slerp() between keyframes so ghost heading avoids gimbal lock from naive Euler lerp.
  • Transform3D — interpolate_with() for jitter-buffered network ghost playback between ordered frames.
  • Saving games — FileAccess / store_var patterns for persisting ghost runs and best-time dictionaries without float display round-trips.
  • High-level multiplayer — server-authoritative RPC validation so clients cannot fake lap/finish crossings.
  • MultiplayerPeer — TRANSFER_MODE_UNRELIABLE for high-frequency racer transforms where TCP-style reliability spikes latency.
  • Input — flush_buffered_events() when frame-perfect boost/stop must see the latest raw input before the physics step.
  • Engine — physics_ticks_per_second / get_physics_frames() for integer frame-count timing bridges into MM:SS.mmm UI.
Prerequisites
  • godot-project-foundations — scene tree, autoloads, and resource layout before wiring a TimeTrialManager and checkpoint Areas into a track scene.
  • godot-physics-3d — Area3D/CollisionShape3D layers, RigidBody/CharacterBody vehicles, and physics-frame overlap rules that make checkpoint sequencing trustworthy.
  • godot-signal-architecture — typed lap/split/finish signals between gates, manager, HUD, and ghost systems without brittle node-path coupling.
  • godot-gdscript-mastery — typed arrays, Packed* buffers, await physics_frame, and RPC annotations used in timing and authority patterns.
Complements
  • godot-input-handling — action maps and buffered boost/steer input that time-trial NEVER rules require to flush before physics.
  • godot-save-load-systems — compressed binary ghost files and best-time persistence beyond in-memory sample arrays.
  • godot-multiplayer-networking — ENet peers, authority, and unreliable transform sync for live races and streamed ghost frames.
  • godot-adapt-single-to-multiplayer — lag compensation, snapshots, and interest patterns when elevating a solo time trial into online racing.
  • godot-navigation-pathfinding — NavigationServer3D agent max-speed for rubber-band AI that paces against the player without cheating collision.
  • godot-monte-carlo-balancer — simulate rubber-band factors, checkpoint difficulty, and target clear times before shipping trial parameters.
  • godot-camera-systems — chase/replay cameras that must track live cars and non-colliding ghost visuals during playback.
Downstream / consumers
  • godot-genre-racing — full racing genre stack that consumes checkpoint clocks, ghosts, and leaderboard formatting as core loop primitives.
  • godot-game-loop-collection — meta inventory/collection loops that can gate unlocks on validated best times from this skill.
Master
  • godot-master — library router and mirrored module entry for cross-skill discovery.

© thedivergentai, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references) in skills/godot-game-loop-time-trial of thedivergentai/GD-Agentic-Skills.

  • SKILL.md
  • references/migration-notes.md
  • references/time-trial-expert-patterns.md
  • scripts/ghost_recorder.gd
  • scripts/ghost_replayer.gd
  • scripts/time_trial_leaderboard_bridge.gd
  • scripts/time_trial_manager.gd
  • scripts/time_trial_patterns.gd
  • scripts/time_trial_playback_buffer.gd

Open the folder on GitHubat commit 4c4d0ff

Compare with similar skills

Godot Game Loop Time Trial next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Godot Game Loop Time Trial compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Godot Game Loop Time Trial this skillthedivergentai/GD-Agentic-Skills821—~3.1kAutomated safety check: PassLGPL-3.0
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
Godot Ability Systemjame581/GodotPrompter805—~3kAutomated safety check: PassMIT
Godot Camera Systemsjame581/GodotPrompter805—~2.8kAutomated safety check: PassMIT
Input MapperRandallLiuXin/GodotMaker5501 repos~727Automated safety check: PassCustom licence
Godotautonomous-ai/openharness1.2k—~570Automated safety check: PassMIT

Similar skills

  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • Godot Ability System

    jame581/GodotPrompter

    Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.

    805 GitHub stars~3k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Godot Camera Systems

    jame581/GodotPrompter

    Shows how to build cameras in Godot 4.3 and later: smooth follow, trauma-based screen shake, camera zones and transitions, with GDScript and C# examples for 2D and 3D.

    805 GitHub stars~2.8k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Input Mapper

    RandallLiuXin/GodotMaker

    Manage Godot input action mappings in project.godot. An agent skill from RandallLiuXin/GodotMaker.

    550 GitHub starsUsed in 1 repo~727 tokens
    Game DevelopmentAuto-check passed
  • Godot

    autonomous-ai/openharness

    Build Godot games with GDScript, native gameplay assertions and sandboxed Web exports.

    1.2k GitHub stars~570 tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Game Design

    ericrisco/rsc-harness

    A skill your agent uses when designing or repairing what makes a game fun — verbs and mechanics, moment-to-moment/session/meta loops, progression, economy faucets and sinks, difficulty curves…

    180 GitHub stars~3.6k tokensUpdated yesterday
    Game DevelopmentAuto-check passed

More from thedivergentai/GD-Agentic-Skills

All 98 skills in this repo
  • Godot 2D Animation

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs.

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot 3D World Building

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders.

    821 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 2D To 3D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for migrating 2D games to 3D including node type conversions, camera systems (third-person, first-person, orbit), physics layer migration, sprite-to-model art pipeline, and control…

    821 GitHub stars~4.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 3D To 2D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for simplifying 3D games to 2D including dimension reduction strategies, 2.5D fake-depth, isometric ports, camera flattening, physics conversion, 3D-to-sprite art pipeline, and…

    821 GitHub stars~4.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Agent Vision

    thedivergentai/GD-Agentic-Skills

    Agentic eyes for Godot work: cross-platform screenshot CLI (asset/region/window/screen) to budgeted WebP, TEMP editor viewport bridge under .gdskills/, and Taste Receptor Atlas v2 (~237…

    821 GitHub stars~3.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Animation Tree Mastery

    thedivergentai/GD-Agentic-Skills

    Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance…

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Godot Game Loop Time Trial

What does Godot Game Loop Time Trial do?

Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4. Godot Game Loop Time Trial is an agent skill from thedivergentai/GD-Agentic-Skills. Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4.

When should I use Godot Game Loop Time Trial?

Godot Game Loop Time Trial fits situations like: building racing games; speed-run platformers.

How do I install Godot Game Loop Time Trial in Claude Code?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-time-trial -a claude-code`. Or copy the skill folder (skills/godot-game-loop-time-trial in thedivergentai/GD-Agentic-Skills) into .claude/skills/godot-game-loop-time-trial in your project. Claude Code loads it when a task matches its description.

How do I install Godot Game Loop Time Trial in Codex?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-time-trial -a codex`. Or copy the skill folder (skills/godot-game-loop-time-trial in thedivergentai/GD-Agentic-Skills) into .agents/skills/godot-game-loop-time-trial in your project. Codex loads it when a task matches its description.

Can I use Godot Game Loop Time Trial in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-time-trial -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-game-loop-time-trial, .gemini/skills/godot-game-loop-time-trial, .github/skills/godot-game-loop-time-trial and .opencode/skills/godot-game-loop-time-trial in your project.

What does Godot Game Loop Time Trial need to run?

SKILL.md names no scripts, command-line tools or credentials: Godot Game Loop Time Trial is instructions for the agent only.

Does Godot Game Loop Time Trial access the network?

SKILL.md names 1 domain. As links in the text: docs.godotengine.org. This is read from the text; nothing was executed.

Is Godot Game Loop Time Trial safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Godot Game Loop Time Trial use?

Godot Game Loop Time Trial is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Godot Game Loop Time Trial use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Godot Game Loop Time Trial?

Skills that share tags, products or a category with Godot Game Loop Time Trial: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), Godot Ability System (jame581/GodotPrompter, 805 stars), Godot Camera Systems (jame581/GodotPrompter, 805 stars) and Input Mapper (RandallLiuXin/GodotMaker, 550 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Godot Game Loop Time Trial?

thedivergentai (a GitHub user) maintains it in thedivergentai/GD-Agentic-Skills, which has 821 GitHub stars. The repository holds 98 skills in this directory. The repository was last updated on September 9, 2026.

Source: thedivergentai/GD-Agentic-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.