← Flint adatlapja
AgentFlint

Skill · 1.0.0 verzió

raylib-játékciklus és állapotok

Rendezi a játék indulását, frissítését, kirajzolását és leállítását. Külön állapotként kezeli a menüt, játékot és szünetet, és korlátozza a hosszú kihagyás utáni szimulációpótlást.

raylib-loop-state

Nézd meg, miben segít

Mikor hasznos?

Akkor használd, ha állapotváltás duplázza a rajzolást vagy megakadás után elromlik az időzítés.

Miben segít neked?

  • Egy felelőst ad az ablak és grafikai környezet életciklusának.
  • Egységes időegységgel választja el a frissítést a rajzolástól.
  • Korlátozza az elmaradt szimuláció pótlását.

Például ezt kérheted

A futójátékhoz készíts főmenü-, játék-, szünet- és vereségállapotot. Hagyd az ablakot fél percig inaktívan, majd térj vissza. A karakter ne ugorjon messzire, a pontozás csak frissítéskor történjen, az új kör pedig fölösleges ablak-újralétrehozás nélkül induljon.

Részletes dokumentáció

Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.

Részletek…Összecsukás

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.

Csomagban lévő fájlok 1

  • SKILL.md