raylib collision and game rules
Turns geometric overlaps into meaningful game events such as hits, pickups and damage. It separates entering contact from staying in contact and keeps object removal safe during gameplay updates.
raylib-collision-gameplay
See how it helpsWhen is it useful?
Use when collision callbacks cause duplicate effects or objects disappear during processing.
What does it help you do?
- Chooses simple checks or broader spatial filtering from actual object counts.
- Distinguishes entering an overlap from remaining in contact.
- Handles spawning and removal without invalidating the active iteration.
Try asking this
In our asteroid shooter, let a missile destroy an asteroid and spawn three fragments. Test two missiles arriving together and a ship remaining in contact with a fragment. Award the destruction once, apply the intended damage interval and avoid skipping objects during removal.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
raylib — collision gameplay
Use when building raylib collision checks, simple spatial queries or stable gameplay rules.
Version and project gate
Inspect The local raylib.h version, linked library, C/C++ build system, platform backend, asset paths, compile flags and ownership conventions. Match the cheatsheet to the linked version rather than assuming the current website API. Never turn a task into an engine upgrade without the user’s intent. Read the version-matching official reference when an API decision depends on it.
Work
Define broadphase needs from actual object counts, then choose available primitive checks. Keep collision detection, response and damage/reward state separate. Specify overlap entry versus persistent contact and protect iteration when objects spawn or disappear.
Deliver
A collision/rules module with clear units, ownership and event semantics. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
A geometric overlap helper is not a complete rigid-body solver; deleting while iterating can skip or invalidate entities.
Acceptance scenario
Exercise simultaneous hits, fast projectiles, multiple pickups and despawning the colliding object during event handling. Follow the project’s execution and verification permissions. If execution or a target device is unavailable, provide the reproduction steps and name the remaining uncertainty; do not mark it passed.
Scope and sources
This skill belongs to Flint. Agent selection is restricted by Orqestria’s assigned-agent policy, including forced skill selection; instruction text alone is not an access control. These are original task workflows researched from official documentation, not a copied or endorsed vendor skill.
Included files 1
SKILL.md
