raylib-Spielschleife und Zustände
Ordnet Start, Aktualisierung, Zeichnen und Beenden des Spiels. Macht Menü-, Spiel- und Pausenzustände ausdrücklich und begrenzt das Nachholen von Simulation nach längeren Unterbrechungen.
raylib-loop-state
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze diesen Skill bei doppeltem Zeichnen oder instabiler Zeit nach Unterbrechungen.
Wobei hilft er dir?
- Ordnet Fenster und Grafikkontext einem Lebenszyklusbesitzer zu.
- Trennt Updates von Zeichnen mit konsistenten Zeiteinheiten.
- Begrenzt nachzuholende Simulation nach langen Pausen.
Das könntest du fragen
Ergänze unseren Runner um Titel-, Spiel-, Pausen- und Game-over-Zustand. Lasse das Fenster dreißig Sekunden inaktiv und kehre zurück. Die Figur springt nicht weit vor, Punkte ändern sich nur im Update und Neustarts erzeugen nicht unnötig ein neues Fenster.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
raylib — loop state
Use when building raylib game loops, application states, restart or pause behavior.
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
Establish window/context initialization and shutdown ownership. Separate state update from drawing and define explicit enter/exit hooks for menu, play and pause. Keep frame delta units consistent; use a fixed simulation accumulator only where gameplay needs it. Bound catch-up after stalls.
Deliver
A small state transition design and a complete executable path from startup to clean exit. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Do not start a second drawing frame inside a helper or run unbounded simulation catch-up after a debugger pause.
Acceptance scenario
Start, pause, restart and exit during each game state; confirm consistent movement after an artificial frame stall. 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.
Enthaltene Dateien 1
SKILL.md
