top-down-movement

Implement configurable 2D top-down movement for FlatRedBall2 entities using TopDownValues and TopDownBehavior.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Top-down movement for FlatRedBall2 enables developers to implement smooth, configurable 2D movement for characters in bird's-eye-view games, handling input, velocity, and facing direction in a reusable way.

Core Features & Use Cases

  • Provides TopDownValues for configurable movement parameters (MaxSpeed, AccelerationTime, DecelerationTime, etc.)
  • Integrates with TopDownBehavior to apply movement each frame based on input
  • Supports directional facing and easy adaptation for AI or player-controlled entities
  • Optional JSON config support for designer-tunable values

Quick Start

Create a Player entity, configure a TopDownValues with MaxSpeed, assign a MovementInput (e.g., KeyboardInput2D), attach a TopDownBehavior, and call Update each frame.

Frequently Asked Questions about top-down-movement

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

FAQPage Schema
How do I implement top-down movement for 2D entities in FlatRedBall2?

To implement top-down movement in FlatRedBall2, configure TopDownValues with MaxSpeed and AccelerationTime, attach a TopDownBehavior to your entity, provide a MovementInput source like KeyboardInput2D, and call Update each frame to apply velocity and directional facing.

Can I use top-down movement for both player-controlled and AI-controlled 2D characters?

Yes, top-down movement supports both player-controlled and AI-controlled 2D characters. You can adapt the MovementInput source to drive either direct player inputs or automated AI logic, allowing both entity types to utilize the same TopDownBehavior and configurable movement values.

What's the best way to configure acceleration and deceleration values for 2D top-down games?

The best way to configure acceleration and deceleration is by adjusting the TopDownValues parameters. You can set MaxSpeed, AccelerationTime, and DecelerationTime directly in code, or use optional JSON-based configuration files to allow designers to tune these movement values externally.

Does FlatRedBall2 top-down movement support 8-way directional input?

Yes, FlatRedBall2 top-down movement supports both 4-way and 8-way directional input. By supplying a compatible MovementInput source such as KeyboardInput2D, the TopDownBehavior processes the directional vectors to handle diagonal movement and directional facing.

How does directional facing work when applying top-down movement to a FlatRedBall2 entity?

Directional facing in top-down movement is handled automatically by the TopDownBehavior based on the active MovementInput vector. As the entity moves in 4-way or 8-way directions, the behavior updates the entity's facing orientation each frame to match its velocity.

Do I need TopDownValues and TopDownBehavior to set up bird's-eye-view character movement?

Yes, TopDownValues and TopDownBehavior are required to set up bird's-eye-view character movement. TopDownValues defines the configurable movement parameters like MaxSpeed, while TopDownBehavior applies these values and your MovementInput to the entity every frame.