time-and-timers

Schedule and control timers and time-based events within Phaser 4 scenes.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/kehwar/pixi-square --skill time-and-timers-kehwar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: time-and-timers
Source: https://github.com/kehwar/pixi-square/tree/main/.agents/skills/time-and-timers
Command: npx skills add https://github.com/kehwar/pixi-square --skill time-and-timers-kehwar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinate and manage time-based actions in Phaser 4 to ensure consistent game pacing and reliable event timing.

Core Features & Use Cases

  • Clock and time scaling: The Clock plugin tracks game time and applies a global timeScale to all timers.
  • TimerEvent and delayed calls: Create one-shot delays and repeating timers to drive gameplay events.
  • Timeline sequencing: Schedule mixed actions (callbacks, tweens, sounds) with absolute or relative timing for cutscenes and events.
  • Pause, resume, and reset: Pause the clock or individual timers, resume progression, and reset sequences as needed.
  • Querying timer state: Inspect progress, elapsed time, remaining time, and repeats to monitor and adapt gameplay.
  • Use Case: Coordinate a multi-phase enemy spawn and a short cutscene by chaining timer events and timeline actions.

Quick Start

Create a one-shot delayed call that logs a message after 1 second.

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 delayed calls and looping timers in Phaser 4?

Use Phaser 4 TimerEvent to create one-shot delayed calls or repeating timers. You configure duration, repeat counts, and callbacks to drive gameplay events, ensuring consistent game pacing and reliable event timing across scenes.

How does time scaling work for Phaser 4 clocks and timers?

Time scaling in Phaser 4 applies a global timeScale via the Clock plugin, affecting all timers. Adjust this scale to slow down or speed up game time uniformly across active timers and timeline sequences.

Can I pause and resume individual timers in a Phaser 4 scene?

Yes, you can pause the Clock or individual TimerEvents and resume progression later. Phaser 4 allows precise control to pause, resume, and reset sequences as needed to adapt gameplay dynamically.

What is the best way to sequence callbacks and tweens for a Phaser 4 cutscene?

Use Phaser 4 Timeline to sequence mixed actions like callbacks, tweens, and sounds with absolute or relative timing. This coordinates multi-phase events such as enemy spawns and cutscenes by chaining timer events.

How do I query elapsed and remaining time on a Phaser 4 timer?

Query timer state in Phaser 4 by inspecting progress, elapsed time, remaining time, and repeat counts. This monitors active TimerEvents and timelines to adapt gameplay logic based on current scheduling conditions.