curves-and-paths

Create and manipulate spline, bezier, and elliptical curves in Phaser 4.

Updated Jun 23, 2026
One-click install
npx skills add https://github.com/Joshua-Allen/stake-engine-game-dev --skill curves-and-paths-joshua-allen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: curves-and-paths
Source: https://github.com/Joshua-Allen/stake-engine-game-dev/tree/main/skills/curves-and-paths
Command: npx skills add https://github.com/Joshua-Allen/stake-engine-game-dev --skill curves-and-paths-joshua-allen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide for creating and managing curves and paths in Phaser 4, streamlining the process of working with splines, bezier curves, lines, ellipses, and path followers.

Core Features & Use Cases

  • Path Creation: Offers step-by-step instructions for creating various types of paths.
  • Curve Management: Explains how to work with different curve types such as lines, spline, cubic and quadratic beziers, and ellipses.
  • PathFollower: Provides a guide on how to create path followers for sprite objects to move along a defined path.
  • Use Case: A game developer wants to create a smooth path for a player character to move along in a game scene using Phaser 4.

Quick Start

Use the 'curves-and-paths' skill to create a path and a path follower for a sprite in your Phaser 4 game.

Frequently Asked Questions about curves-and-paths

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

FAQPage Schema
How do I create smooth movement paths for sprites in Phaser 4?

To create smooth movement paths for sprites in Phaser 4, you define a series of curves like splines or beziers into a single path object, then attach a PathFollower to your sprite. This lets the game object seamlessly traverse the defined route.

What types of curves can I use to build custom paths in Phaser 4?

Phaser 4 supports building custom paths using several curve types including lines, splines, cubic and quadratic beziers, and ellipses. Combining these different curve segments allows you to construct complex graphical routes for game elements.

How do I make a game character follow a spline curve in Phaser 4?

Making a game character follow a spline curve in Phaser 4 involves creating a path from spline curve points and configuring the PathFollower component for your sprite. The follower logic automatically updates the character's position along the spline during the game update loop.

Does Phaser 4 support combining bezier curves and lines in a single path?

Phaser 4 supports combining bezier curves and lines within a single path object. You can sequentially add various curve segments such as cubic beziers, quadratic beziers, and straight lines to construct a unified, continuous path for sprites.

Can I use elliptical curves to create circular enemy movement patterns in Phaser 4?

You can use elliptical curves to create circular and orbital enemy movement patterns in Phaser 4. By defining an ellipse curve within your path and applying a PathFollower, enemies will continuously trace the elliptical route in your game scene.

What is the best way to manage complex paths with multiple curve segments in Phaser 4?

The best way to manage complex paths with multiple curve segments in Phaser 4 is to use the built-in path management API to sequentially combine splines, beziers, and lines. This approach centralizes route logic and simplifies attaching multiple sprites via PathFollowers.