NEVER Do (collection landmines)
- NEVER reuse or omit stable collectible IDs β Duplicate IDs double-count or overwrite; missing IDs break completion % and saves.
- NEVER count the same Area overlap twice β
body_enteredcan re-fire on re-entry; gate with "already collected" / one-shot disable of monitoring. - NEVER persist NodePaths as the identity of collectibles β Paths break on scene moves; save IDs (StringName / int), not
get_path(). - NEVER soft-lock the last item β If compass / spawn logic depends on "remaining > 1", the final pickup becomes unfindable.
- NEVER store hunt progress only in scene-local nodes β Level reload wipes progress; keep collected set in collection_manager.gd + save.
- NEVER
queue_free()collectibles with zero juice and no ID commit β Commit ID first (signal), then VFX, then free. - NEVER scale collectible collision shapes non-uniformly β Breaks overlap math; edit shape resources.
- NEVER hardcode spawn positions in code β Use Marker3D / designer points with hidden_item_spawner.gd.
- NEVER drive collection truth from UI silhouettes β Archive UI mirrors manager state; manager is authoritative.
- NEVER load massive levels synchronously on hunt complete β use threaded
ResourceLoader(see references). - NEVER manipulate SceneTree from worker threads β
call_deferredonly.
Golden Path (MANDATORY)
- collectible_item.gd β
item_id(unique) +collection_id(hunt), one-shot Area pickup - collection_manager.gd β authoritative collected-ID set via
register_item()+get_remaining_ids() - collection_compass.gd β nearest node whose
item_idis still in manager remainders - Persist collected IDs via godot-save-load-systems
Optional: hidden_item_spawner.gd for randomized hunts; collection_loop_patterns.gd for advanced loop/MainLoop helpers.
Available Scripts (full set)
- collectible_item.gd β MANDATORY pickup actor; export stable
item_idper instance and huntcollection_id - collection_manager.gd β MANDATORY progress brain;
start_collection(id, item_ids)thenregister_item(id, item_id) - collection_compass.gd β MANDATORY when guiding players; wire
collection_managerand queryget_remaining_ids() - hidden_item_spawner.gd β designer markers / chance spawns (Do NOT Load for fixed placed-only hunts)
- collection_loop_patterns.gd β advanced loop patterns (Do NOT Load for simple ID hunts)
Expert Collection Patterns
1. Persistent Collection (Save/Load)
Serialize the managerβs collected item_id set per collection_id (PackedStringArray via get_collected_ids() / restore_collected_ids()), not node paths. Reload: manager restores set β collectibles self-disable if item_id already owned.
2. Collection Archive UI (Silhouettes)
Grid of icons: uncollected modulate silhouette; reveal when manager signals that ID. UI never invents collected state.
MANDATORY for threaded loads, MainLoop helpers, and archive/save depth: collection-loop-advanced.md. Do NOT Load for simple fixed-ID scavenger hunts.
Reference
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.
Official Documentation
- Area3D β
body_enteredpickup volumes for 3D collectibles and layer/mask setup so only the player triggers collection. - Using Area2D β 2D overlap patterns when adapting the same collectible loop to Area2D/Sprite2D radar UIs.
- Groups β register collectibles and broadcast resets via
get_nodes_in_group/call_groupwithout hard-coded node paths. - Idle and physics processing β keep collision-driven progress in
_physics_process/ physics frames; throttle compass/UI work in_process. - SceneTree β pause flags, groups,
physics_frame, andcurrent_sceneownership used by collection state transitions. - Change scenes manually β deferred free + instantiate handoff when finishing a hunt and loading the next level.
- Background loading β
ResourceLoader.load_threaded_request/ status polling so large collectible levels do not hitch the main thread. - Saving games β persist collected IDs and progress dictionaries with
FileAccessunderuser://. - Vector math β
direction_to/get_angle_tofor nearest-collectible compass pointing. - Marker3D β designer-placed spawn anchors for hidden-item hunts instead of hard-coded coordinates.
- Using signals β typed
item_collected/collection_updatedwiring from pickups into the manager and UI. - MainLoop β custom loop extension surface referenced by advanced collection_loop_patterns (rarely needed over SceneTree).
Related Skills
Prerequisites
- godot-project-foundations β scene tree,
@onready, and resource basics before wiring managers, markers, and collectible scenes. - godot-gdscript-mastery β typed signals,
match,await, and deferred calls used throughout collection managers and loop patterns. - godot-physics-3d β Area3D/CollisionShape3D layers and non-uniform scale pitfalls that break pickup detection.
Complements
- godot-signal-architecture β safe dynamic connections and event-bus patterns when many collectibles notify one manager.
- godot-scene-management β threaded scene swaps and ownership rules for end-of-hunt level transitions.
- godot-save-load-systems β durable save schemas for which items remain collected across sessions.
- godot-ui-containers β silhouette archive grids and progress HUD layouts driven by
collection_updated. - godot-particles β spawn juice VFX before
queue_freeso pickups feel responsive. - godot-audio-systems β one-shot pickup SFX and bus routing tied to collect events.
- godot-monte-carlo-balancer β tune spawn_chance, target counts, and hunt length against completion-time distributions.
Downstream / consumers
- godot-quest-system β wraps collection progress as quest objectives with rewards and branching.
- godot-inventory-system β turns collected pickups into inventory grants when items are kept rather than consumed.
- godot-theme-easter β seasonal egg-hunt presentation layered on the same collection loop.
Master
- godot-master β library router and mirrored module entry for cross-skill discovery.