$npx -y skills add thedivergentai/GD-Agentic-Skills --skill godot-genre-racingExpert blueprint for racing games including vehicle physics (VehicleBody3D, suspension, friction), checkpoint systems (prevent shortcuts), rubber-banding AI (keep races competitive), drifting mechanics (reduce friction, boost on exit), camera feel (FOV increase with speed, motion
| 1 | ## Godot 4.7 Baseline |
| 2 | |
| 3 | - Expert patterns in this skill target **Godot 4.7+** (stable, 2026-06-18). |
| 4 | - Consult the [Godot 4.7 migration guide](https://docs.godotengine.org/en/4.7/tutorials/migrating/upgrading_to_godot_4.7.html) when upgrading projects from 4.6. |
| 5 | - **NEVER** assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes. |
| 6 | |
| 7 | # Genre: Racing |
| 8 | |
| 9 | Expert blueprint for racing games balancing physics, competition, and sense of speed. |
| 10 | |
| 11 | ## NEVER Do (Expert Anti-Patterns) |
| 12 | |
| 13 | ### Physics & Handling |
| 14 | - NEVER use a rigid camera attachment; strictly use a **Smooth Follow** pattern with `lerp()` to prevent motion sickness. |
| 15 | - NEVER prioritize realism over fun; strictly increase **Gravity Scale** (2x-3x) and keep friction high for responsive arcade feel. |
| 16 | - NEVER use `VehicleBody3D` default settings for karts; strictly rewrite suspension using Raycasts or custom spring/damper models. |
| 17 | - NEVER apply steering torque directly to mass; strictly use a steering curve factored by lateral velocity. |
| 18 | - NEVER calculate suspension without a damper model; strictly include damping to prevent eternal oscillation (bouncing). |
| 19 | - NEVER ignore the **Center of Mass** property; strictly offset it downward to ensure stability during high-speed turns. |
| 20 | - NEVER multiply engine force by `delta`; it is an integrated force in the physics solver. |
| 21 | - NEVER rely on `is_action_pressed()` for manual gear shifting; strictly use `is_action_just_pressed()` for single-tap accuracy. |
| 22 | |
| 23 | ### AI & Competition |
| 24 | - NEVER use static AI speeds; strictly use **Rubber-Banding** to keep races competitive based on player distance. |
| 25 | - NEVER run AI pathfinding across the entire track every frame; strictly use a "Look-Ahead" point on a spline/path. |
| 26 | - NEVER ignore racing **Checkpoints**; strictly enforce sequential `Area3D` validation to prevent track shortcuts. |
| 27 | - NEVER use standard `Area3D` for slipstreaming without a **Dot Product** check to ensure the player is directly behind. |
| 28 | |
| 29 | ### Visuals & Audio |
| 30 | - NEVER skip "Sense of Speed" effects; strictly implement dynamic **FOV scaling**, motion blur, and high-speed camera shake. |
| 31 | - NEVER update minimap transforms for static elements in `_process()`; strictly update dynamic racers only. |
| 32 | - NEVER serialize ghost cars as mass transform lists; strictly store positions/quaternions at fixed intervals. |
| 33 | - NEVER use constant pitch for engine sounds; strictly map RPM or engine load to `pitch_scale`. |
| 34 | - NEVER spawn particles for skid marks every frame; strictly use **Trail3D** or procedural strips for low-cost persistence. |
| 35 | - NEVER use standard Strings for surface detection; strictly use `StringName` (e.g., `&"asphalt"`). |
| 36 | |
| 37 | --- |
| 38 | |
| 39 | ## 🛠 Expert Components (scripts/) |
| 40 | |
| 41 | ### Original Expert Patterns |
| 42 | - [arcade_vehicle_physics.gd](scripts/arcade_vehicle_physics.gd) - High-performance arcade handling with custom gravity, air control, and friction-slip drifting. |
| 43 | - [spline_ai_controller.gd](scripts/spline_ai_controller.gd) - Professional racing AI using Path3D predictive steering and rubber-banding logic. |
| 44 | |
| 45 | ### Modular Components |
| 46 | - [arcade_vehicle_controller.gd](scripts/arcade_vehicle_controller.gd) - Alternative tight, raycast-based vehicle movement model for non-physics karts. |
| 47 | - [slipstream_handler.gd](scripts/slipstream_handler.gd) - Drafting zones with relative dot-product checks for speed boosts. |
| 48 | - [lap_tracker.gd](scripts/lap_tracker.gd) - High-precision lap management with sequential checkpoint logic. |
| 49 | - [ghost_recorder.gd](scripts/ghost_recorder.gd) - Binary transform serialization for lightweight ghost car playback. |
| 50 | - [engine_audio_controller.gd](scripts/engine_audio_controller.gd) - RPM-to-pitch audio synthesis for engine revving and gear shifts. |
| 51 | - [skid_mark_emitter.gd](scripts/skid_mark_emitter.gd) - Conditional tire-slip trail system for persistent visual feedback. |
| 52 | - [minimap_icon_projector.gd](scripts/minimap_icon_projector.gd) - 3D-to-2D bridge for projecting racers onto a localized UI. |
| 53 | - [force_feedback_router.gd](scripts/force_feedback_router.gd) - Haptic and rumble management based on terrain and collisions. |
| 54 | - [raycast_suspension.gd](scripts/raycast_suspension.gd) - Spring/damper model for raycast wheels with configurable stiffness. |
| 55 | - [racing_checkpoint.gd](scripts/racing_checkpoint.gd) - Indexed trigger gate for modular track-based lap progression. |
| 56 | |
| 57 | --- |
| 58 | |
| 59 | ## Core Loop |
| 60 | 1. **Race**: Player controls a vehicle on a track. |
| 61 | 2. **Compete**: Player overtakes |