physics-and-movement

Implement 2D physics and movement patterns in FlatRedBall2.

11|3|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/vchelaru/FlatRedBall2 --skill physics-and-movement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-and-movement
Source: https://github.com/vchelaru/FlatRedBall2/tree/main/frb-skills/physics-and-movement
Command: npx skills add https://github.com/vchelaru/FlatRedBall2 --skill physics-and-movement

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers implement and reason about 2D physics and movement in FlatRedBall2, covering velocity, acceleration, drag, gravity, and common motion patterns.

Core Features & Use Cases

  • Coordinate system and physics properties: Y+ up, velocity, acceleration, and drag.
  • Kinematic integration and update order: position and velocity are updated with gravity and drag for smooth motion.
  • Movement patterns: horizontal movement, jumping, rotation-based thrust, and projectile motion; includes random spawning utilities with GameRandom.
  • Practical use case: build platformers and top-down shooters with realistic motion.

Quick Start

Start a sample project, create an entity, apply velocity and acceleration, and observe movement under gravity and drag.

Frequently Asked Questions about physics-and-movement

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

FAQPage Schema
How do I implement gravity and drag in FlatRedBall2?

FlatRedBall2 applies gravity and drag using kinematic integration during the update loop, modifying velocity and position for smooth motion. You apply acceleration values to entities and the engine integrates them with drag properties automatically.

What is the coordinate system for 2D physics in FlatRedBall2?

FlatRedBall2 physics uses a coordinate system where Y+ is up. This affects how you apply velocity, acceleration, and gravity to entities, ensuring vertical movement and jumping function correctly.

How do I set up jumping and projectile motion for a platformer in FlatRedBall2?

You implement jumping and projectile motion in FlatRedBall2 by applying initial vertical velocity for jumps and using rotation-based thrust for projectiles. Gravity and drag handle continuous kinematic integration to create realistic arc motion.

Does FlatRedBall2 support top-down shooter movement patterns?

Yes, FlatRedBall2 supports top-down shooter movement patterns by allowing you to apply velocity, acceleration, and rotation-based thrust to entities. You can disable gravity and use drag to create smooth stopping mechanics.

What is the correct update order for velocity and position integration in FlatRedBall2?

The correct update order in FlatRedBall2 applies velocity and acceleration first, then integrates gravity and drag, and finally updates the entity position. This sequence ensures smooth kinematic motion without visual stuttering.

How do I spawn entities with random velocities in FlatRedBall2?

You spawn entities with random velocities in FlatRedBall2 using GameRandom utilities. This allows you to generate randomized movement patterns for projectiles and spawning enemies while maintaining consistent physics integration.