Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.
The English summary is being prepared. Showing the original description.
Expert patterns for racing mechanics, checkpoint tracking, and ghost recording/playback in Godot 4. Use when building racing games, speed-run platformers, or arcade trials.
The English summary is being prepared. Showing the original description.
Run score Not tested
See how to installReview the instructions the agent will receive before you install.
A Master implementation treats Time Trials as a State-Validated Sequence. Recording a time is easy; ensuring the player didn't cheat via shortcuts requires a strictly ordered CheckpointManager.
Prevent "Shortcut Cheating" by requiring checkpoints to be cleared in numerical order.
Wire Area body_entered (physics) → TimeTrialManager.pass_checkpoint(index). The manager owns usec timing — see script.
Sample at a fixed rate (e.g. 10 Hz). Lerp position; slerp Quaternion rotation (ghost_recorder.gd / ghost_replayer.gd). Never Euler-lerp ghost heading.
| Format | Best For | Implementation |
|---|---|---|
| Dictionary Array | Prototyping | Simple [{t: 0.1, p: pos}, ...] |
| Typed Array | Performance | PackedVector3Array for positions. |
| JSON/Binary | Saving | FileAccess.get_var() to save ghost files. |
Time.get_ticks_usec() for microsecond precision._physics_process() to guarantee detection within the fixed physics step.await get_tree().physics_frame before checking for players.BoxShape3D.size) instead.ENetMultiplayerPeer with TRANSFER_MODE_UNRELIABLE for high-frequency position updates.multiplayer.is_server() to prevent cheating.is_equal_approx() to account for precision loss in accumulated time variables.Input.flush_buffered_events() to ensure the engine has processed the latest raw input.PackedVector3Array to maintain a contiguous memory block.@onready to cache node references during initialization.Player physics layer to minimize the number of physics overlap calculations.slerp() or Quaternion.slerp() to avoid gimbal lock and ensure smooth rotation interpolation.MANDATORY: Follow the golden path order. Read each listed script before coding that stage.
time_trial_manager.gd — microsecond (Time.get_ticks_usec) or physics-frame clock; pass_checkpoint only from physics overlaps / Area signals_process)ghost_recorder.gd — samples {t, p, q} with Quaternion rotationghost_replayer.gd — position lerp + Quaternion slerp (never Euler lerp)time_trial_leaderboard_bridge.gd — integer usec/msec → UI strings10 Expert patterns: Microsecond timing, server-authoritative validation, rubber-banding AI, and frame-perfect input flushing.
Central clock. Accumulates Time.get_ticks_usec() (or physics-frame counts). Finish checks must come from physics overlaps.
Captures transform samples with Quaternion "q" fields for slerp-safe playback.
MANDATORY with recorder. Replays samples via position lerp + Quaternion.slerp.
Jitter-buffer for smooth ghost playback during network streaming.
Formatting utility for converting raw time data to human-readable strings.
Store a keyframe only when position/rotation changes beyond a threshold. Persist with FileAccess.open_compressed() + ZSTD; prefer binary floats over JSON.
Store records as int usec/msec. Format with %02d:%02d.%03d for stable UI (e.g. 01:24.450).
LLM-ignorance rule: If a general agent would not know it before reading, load the reference — never delete expert deltas.
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
get_ticks_usec() for microsecond lap clocks when OS.get_ticks_msec() is too coarse for race records._physics_process, not visual _process frames that can skip under load.body_entered for ordered checkpoint gates without scanning every physics body.BoxShape3D.size) instead of non-uniform CollisionShape3D scale so SAT stays valid on gates.slerp() between keyframes so ghost heading avoids gimbal lock from naive Euler lerp.interpolate_with() for jitter-buffered network ghost playback between ordered frames.FileAccess / store_var patterns for persisting ghost runs and best-time dictionaries without float display round-trips.TRANSFER_MODE_UNRELIABLE for high-frequency racer transforms where TCP-style reliability spikes latency.flush_buffered_events() when frame-perfect boost/stop must see the latest raw input before the physics step.physics_ticks_per_second / get_physics_frames() for integer frame-count timing bridges into MM:SS.mmm UI.TimeTrialManager and checkpoint Areas into a track scene.await physics_frame, and RPC annotations used in timing and authority patterns.No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.
The English summary is being prepared. Showing the original description.
Bevy ECS skill for 3D lights. Keywords: Bevy, lighting, directional, point, spot, bevy_light, PBR.
The English summary is being prepared. Showing the original description.
Bevy ECS skill for PBR materials. Keywords: Bevy, StandardMaterial, PBR, material, ExtendedMaterial.
The English summary is being prepared. Showing the original description.
Bevy ECS skill for 3D level assembly. Keywords: Bevy, level, scene, mesh, world, ECS.
The English summary is being prepared. Showing the original description.
Bevy ECS skill for abilities. Keywords: Bevy, ability, cooldown, ECS, gameplay.
The English summary is being prepared. Showing the original description.
Bevy ECS skill for moving a Bevy game from 2D to 3D. Keywords: Bevy, 2D, 3D, adapt, camera, sprite.
The English summary is being prepared. Showing the original description.