This skill teaches an agent to move and collide sprites with Phaser 4 Arcade Physics, the fast axis-aligned engine behind most browser platformers, shooters and top-down games. It covers creating bodies through the physics factory, moving them by velocity, registering colliders and overlaps once, and pooling projectiles.
It lists the problems behind most Arcade questions: a sprite that ignores physics, onFloor that is always false, platforms that get shoved around, fast bullets that pass through thin walls, and colliders added every frame.
What You Get
- A workflow that starts with debug outlines and velocity lines so collision problems are visible
- Patterns for enabling Arcade, top-down movement with even diagonals, a platformer ground check, collider versus overlap, and pooled projectiles
- A runtime probe that reads body counts, onFloor and player position from the running scene
- A gotcha list covering static bodies that moved, collision categories and masks, drag, and pools that stop handing out bullets
- A reference on drag, bounce, hitboxes, collision categories, touching versus blocked and worldbounds events
Common Use Cases
- Building a Phaser platformer or top-down movement controller
- Fixing a sprite that ignores gravity or colliders because it has no body
- Making pickups, hurtboxes and triggers with overlaps
- Stopping fast bullets from tunnelling through thin walls
What Makes It Unique
The skill is specific to Arcade Physics in Phaser 4.2 and notes where Arcade stops: no rotation in collision, no joints, and Matter bodies never collide with Arcade bodies. It carries version-checked details such as the default step rate and collision category masks, and sends jump feel, scene setup and tunnelling theory to sibling skills.
Under The Hood
The agent loads the SKILL.md and reads the bodies and collision reference when it tunes hitboxes or categories. It edits your game’s JavaScript or TypeScript, runs the build or type check, and probes the running game by evaluating a snippet in the page, which can reuse the headless browser script from the Phaser core skill. It may take a screenshot with debug drawing on. It does not call outside services.