collision-relationships

Define and manage collision relationships between entity groups in FlatRedBall2.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables you to define and manage collisions between groups of entities in FlatRedBall2, allowing precise control over what happens when they overlap.

Core Features & Use Cases

  • AddCollisionRelationship wires two groups to test for overlaps each frame and apply a configured response.
  • Fluent modifiers like .MoveFirstOnCollision(), .MoveBothOnCollision(...), and .BounceOnCollision(...) tailor how entities separate.
  • Collision events and lifecycle hooks (CollisionOccurred, CollisionStarted, CollisionEnded) enable gameplay effects, damage, sounds, and state changes.
  • TileShapes and one-way platforms support complex level geometry, slope handling, and tricky platformer interactions.

Quick Start

Create a relationship between two factories in your Screen, configure the desired response, and subscribe to CollisionOccurred for on-hit logic.

Frequently Asked Questions about collision-relationships

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

FAQPage Schema
How do I set up collision relationships between entity groups in FlatRedBall2?

To set up collision relationships in FlatRedBall2, use AddCollisionRelationship to wire two entity groups together for per-frame overlap testing, then apply modifiers like MoveFirstOnCollision or BounceOnCollision to configure the physical response.

Can I create one-way platforms and handle slopes using tile shapes in FlatRedBall2?

FlatRedBall2 collision relationships support tile-based geometry and one-way platforms, allowing you to define complex level geometry interactions like slope handling and tricky platformer movements directly within your Screen configuration.

How do I trigger gameplay events when entities collide in FlatRedBall2?

You can trigger gameplay events during entity collisions in FlatRedBall2 by subscribing to collision lifecycle hooks such as CollisionStarted, CollisionOccurred, and CollisionEnded to execute damage, sounds, or state changes.

What's the best way to configure entities to bounce or move apart on collision in FlatRedBall2?

The best way to configure collision responses in FlatRedBall2 is by chaining fluent modifiers like BounceOnCollision, MoveFirstOnCollision, or MoveBothOnCollision onto your relationship definition to dictate how entities separate upon overlap.

Does FlatRedBall2 collision testing support non-default collision shapes on desktop and browser backends?

FlatRedBall2 collision relationships operate across desktop and browser backends, providing per-frame collision testing and integration with both default and non-default collision shapes for 2D games.

Why are my collision events not firing between specific entity groups in FlatRedBall2?

Collision events in FlatRedBall2 require an explicit AddCollisionRelationship call between the specific entity factories in your Screen; without wiring this per-frame test, overlaps will not trigger CollisionStarted or CollisionEnded.