makepad/aigame_port_inventory.md
Admin 449f51be7a gamemaker prerequisites: makepad-tts library, TTS/whisper model downloader, aigame design docs
libs/tts was never tracked despite being a build dependency of the gamemaker
example. tools/download_tts.sh fetches the public upstream weights (HuggingFace
Kokoro-82M + whisper.cpp) and converts them locally with the in-repo stdlib-only
converter; model artifacts are gitignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 13:29:22 +02:00

70 lines
4.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# my-game → splash port inventory (generated 2026-07-09)
Exhaustive Godot API surface of ~/games/my-game (the AI-generated corpus), used as the
acceptance checklist for the aigame engine port. Two parallel games: 2D side-scroller
(main.tscn) and the ACTIVE 3D sandbox (main3d.tscn, run/main_scene). 13 actors share one
behavior pattern set; 2D/3D scripts are near-mirrors.
## First-class engine APIs required (by measured usage weight)
- **Position as currency**: `global_position` read/write ×122 (write = teleport: respawn,
mount-follow, carry). `distance_to` ×14, `length` ×23, `normalized` ×16.
- **Kinematic character motion**: `move_and_slide` ×14 (ALL actors), `is_on_floor()` ×33,
hand-rolled gravity (`velocity.y += G*dt`, engine gravity unused), `move_toward` ×9
(friction), `is_on_wall` ×6 (hop trigger), per-actor jump/fall constants, respawn on
fall (y beyond limit → teleport to recorded `_spawn`).
- **World building**: StaticBody2D/3D + box colliders for ALL terrain; 3D visuals 100%
MeshInstance3D+BoxMesh+StandardMaterial3D.albedo_color (8 sites); 2D visuals 100%
ColorRect. Counts: 2D = 6 ground + 19 platforms + 7 movers + walls/flag/hills; 3D =
ground 3 + stairs 7 + towers 8 + trees 12 + goal + 10 creatures + 2 vehicles.
- **Groups as event bus** (no signal bus!): groups player/vehicle/soldier/kissy/huggy/game;
`get_nodes_in_group` iterated per-frame for nearest-target;
broadcast = scan group + `has_method()` duck-typing ×14 (`huggy_caught`, `enrage`,
`capture`, `rescue`, `zap`, `send_home`, `cam_yaw`…). Engine needs: tags + find/iterate
+ dynamic method dispatch on entities.
- **Scene tree**: `add_child` ×53 (all procedural), `is_instance_valid` ×14 (cached-ref
guards), `set_script` ×6 (behavior attach to bare bodies), `queue_free` ×3 (bolt).
- **Input**: `get_axis(left,right)` ×6, `is_action_just_pressed` ×7; actions used:
shoot×8, ui_up/right/left/accept×4 each, ui_down×2, ui_cancel×1. RUNTIME InputMap
action creation (shoot = mouse-left + F key + gamepad X). Mouse-capture relative-motion
camera (captured/visible modes, pitch clamp, Esc release).
- **Camera**: 2D = child cam, position smoothing (speed 6), level-bounds limits.
3D = CamYaw→CamPitch→Camera3D boom (z=13), mouse yaw/pitch, camera-relative locomotion
via `Basis(UP, yaw) * wish` — shared by player AND vehicle steering (`driver.cam_yaw()`).
- **Random/AI math**: randf_range ×16, randf ×7, randi/pick_random ×5, lerp ×8, atan2
(model facing), sin/cos ping-pong (movers).
- **Audio — procedural synth, zero files** (sfx.gd autoload the AI wrote itself):
8-voice AudioStreamPlayer pool, 22050Hz s16 WAV buffers generated by `_sweep`
(square pitch glide), `_zap` (falling tone+noise), `_notes` (arpeggio). Bank: jump,
shoot, zap, grab, angry, calm, rescue, shove, board, win. API `Sfx.play(name, pitch)`.
→ aigame should ship this as first-class (`game.sfx("jump")` + beep/jingle synth).
## Structural patterns to support
- Mount/dismount: nearest group("vehicle") within REACH → `mount(player)` → disable
collider (deferred) + stop actor physics + per-frame teleport to seat; up to 3
passenger seats; eject with pop velocity + cooldown.
- Win conditions polled in `_process` (goal distance / x threshold) + `_won` latch + HUD.
- HUD: Label text/visible + font/outline theme overrides; transient banners via
`await create_timer(s)` with generation-token cancel (the ONLY async in the game — no
tweens/AnimationPlayer anywhere).
- Ledge AI: RayCast repositioned per frame + force_raycast_update; ±90° sidestep along
edges (no navmesh). Needs script-facing raycast.
- Moving platforms (2D): AnimatableBody2D sync_to_physics, cosine ping-pong, carries
riders via floor tracking.
- Collision layers: 1=world, 2=creatures, 4=vehicle, 8=player; creatures/player mask
world-only (pass through each other); bolt masks world+creatures.
- Label3D billboard nametags (no_depth_test); emission material on bolt projectile;
ProceduralSky + one shadowed DirectionalLight3D.
## Confirmed absent (do NOT build): tweens, particles, AnimationPlayer, navmesh,
custom shaders, paths, physics joints (in-game), signals (only Area3D.body_entered ×1).
## Porting risk list (ranked)
1. Procedural audio synth (engine-side now, task #6)
2. Mouse-capture camera + camera-relative movement basis
3. Ledge raycast AI (script raycast API)
4. Moving platforms carrying riders (mover ground-velocity inheritance)
5. Runtime input action registration (ActionMap covers it)
6. Deferred collision toggling during mount (engine needs disable-collision-safe-point)
7. Jolt move_and_slide floor-snap feel parity (box3d mover tuning)