geometry-and-math

Perform geometric and math operations for Phaser 4 game development.

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/Autinhorse/levelcraft --skill geometry-and-math-autinhorse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: geometry-and-math
Source: https://github.com/Autinhorse/levelcraft/tree/main/games/docs/phaser-skills/geometry-and-math
Command: npx skills add https://github.com/Autinhorse/levelcraft --skill geometry-and-math-autinhorse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers utilize Phaser 4's comprehensive geometry and math utilities to perform complex geometric computations and shape manipulations efficiently.

Core Features & Use Cases

  • Shape Creation & Manipulation: Create and modify rectangles, circles, lines, polygons, and triangles for game object logic.
  • Collision & Intersection Testing: Detect overlaps and intersections between geometric objects to facilitate physics and gameplay mechanics.
  • Math Utilities: Calculate distances, angles, interpolate values, and generate random numbers for dynamic behaviors.
  • Use Case: Implement precise hit detection between moving objects or generate random spawn points within defined areas using Phaser Math utilities.

Quick Start

Use this skill to perform collision detection between a circle and rectangle and calculate the distance between two points in your game scene.

Frequently Asked Questions about geometry-and-math

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

FAQPage Schema
How do I detect collision between geometric shapes in Phaser 4?

To detect collision in Phaser 4, you perform intersection tests between geometric shapes like rectangles and circles. This Skill facilitates precise overlap detection, enabling accurate physics and gameplay mechanics for interactive game objects.

What's the best way to calculate distances and angles for game physics in Phaser?

Calculating distances and angles for game physics in Phaser is done using built-in math utilities. This Skill provides functions to calculate point distances, determine angles, and interpolate values for dynamic game object behaviors.

Can I use Phaser 4 math utilities to generate random spawn points within defined areas?

Yes, you can use Phaser 4 math utilities to generate random spawn points within defined areas. This Skill enables calculations for dynamic behaviors, including random number generation within geometric boundaries for game scenes.

Does this approach require a complex physics engine setup for simple shape intersections?

This approach requires minimal setup for shape intersections, bypassing complex physics engine configurations. It focuses directly on efficient shape creation and geometric logic, allowing precise hit detection between moving objects.

What types of geometric shapes can I create and manipulate for game object logic?

You can create and manipulate rectangles, circles, lines, polygons, and triangles for game object logic. This Skill facilitates modifying these geometric objects to handle precise calculations and shape manipulations efficiently.