time-and-timers

Manage game-time events and sequences in Phaser 4 scenes.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/Dominik-Steinweg/Fragdachse --skill time-and-timers-dominik-steinweg
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/Dominik-Steinweg/Fragdachse/tree/main/.agents/skills/time-and-timers
Command: npx skills add https://github.com/Dominik-Steinweg/Fragdachse --skill time-and-timers-dominik-steinweg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves the complexity of managing game-time synchronization, event scheduling, and cutscene orchestration in Phaser 4, preventing common issues like off-by-one errors in loops and improper timer cleanup.

Core Features & Use Cases

  • Clock Management: Precise control over game time, including pausing, time scaling for slow-motion effects, and delta-time tracking.
  • Event Sequencing: Use Timelines to choreograph complex cutscenes involving tweens, sounds, and property changes with absolute or relative timing.
  • Use Case: Implement a repeating enemy spawner that scales its frequency based on game difficulty, or build a multi-step cutscene that triggers sounds and animations in a specific sequence.

Quick Start

Use the time-and-timers skill to schedule a repeating function call every two seconds by adding a new event to the scene clock.

Frequently Asked Questions about time-and-timers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule repeating timers in Phaser 4?▼

Schedule repeating timers in Phaser 4 by adding a new event to the scene clock with a specific delay interval. This approach handles frame-accurate event scheduling and infinite loops efficiently.

How does event sequencing work for Phaser cutscenes?▼

Event sequencing for Phaser cutscenes uses the Timeline API to choreograph complex sequences. You can trigger tweens, sounds, and property changes using absolute or relative timing for linear orchestration.

Can I manipulate time scaling for slow-motion effects in Phaser?▼

Yes, you can manipulate time scaling for slow-motion effects in Phaser using Clock Management. This provides precise control over game time, including pausing, time scaling, and delta-time tracking within scenes.

What is the best way to manage timer cleanup in game development?▼

The best way to manage timer cleanup in game development is using lifecycle-aware timer cleanup. This prevents improper timer destruction and avoids off-by-one errors in loops within Phaser scenes.

Why do my Phaser repeating loops have off-by-one errors?▼

Repeating loops in Phaser have off-by-one errors due to improper timer management and complexity in game-time synchronization. Using a dedicated timing approach resolves these issues with precise event scheduling and lifecycle-aware cleanup.