time-and-timers

Orchestrate time-based events in Phaser 4 scenes with Clock, TimerEvent, and Timeline.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phaser 4 games often rely on precise timing for events like delayed actions, repeated spawns, and synchronized cutscenes; this Skill consolidates how to schedule one-shot delays, repeating timers, and timeline-based sequences.

Core Features & Use Cases

  • One-shot delayed calls using this.time.delayedCall to execute a callback after a given delay.
  • Repeating timers via this.time.addEvent with repeat or loop to drive periodic actions.
  • Infinite loops and time scaling through timeScale and startAt for fine-grained control of timer progression.
  • Timeline sequences with this.add.timeline to choreograph complex event orders, tweens, and sounds.

Quick Start

Create a delayed call that fires after 1000ms and a looping timer that repeats every 500ms to observe timer-based actions in your scene.

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 a delayed action in a Phaser 4 scene?

To schedule a delayed action in Phaser 4, use this.time.delayedCall to execute a callback after a specified delay. This one-shot timer is ideal for triggering single events after 1000ms.

What is the best way to create repeating timers for periodic spawns in Phaser?

The best way to create repeating timers in Phaser is using this.time.addEvent with the repeat or loop property. This drives periodic actions such as looping timers that repeat every 500ms for continuous gameplay mechanics.

How do I choreograph complex event sequences and tweens using Phaser timelines?

To choreograph complex event sequences in Phaser, use this.add.timeline to coordinate timed sequences. This orchestrates event orders, tweens, and sounds across gameplay for synchronized cutscenes and multi-stage actions.

Can I scale or offset timer progression in Phaser 4 for slow-motion effects?

Yes, you can scale or offset timer progression in Phaser 4 using the timeScale and startAt properties. These provide fine-grained control over timer progression, enabling slow-motion effects and precise timing adjustments.

Why are my Phaser 4 timers firing inconsistently during pause states?

Phaser 4 timers fire inconsistently during pause states due to improper handling of timeScale and pause configurations. Ensuring careful handling of these APIs guarantees deterministic timing across your gameplay scenes.