# Action Timing Lab 0.1.1 Action Timing Lab is a free, offline browser companion to Action Director. Compare startup, active and recovery counts, see the difference in milliseconds, and export two phase sketches that the Godot Action Director runtime can read. It also inspects existing ActionSpec files for overlapping phase windows without rewriting them. By Juda H for One More Run. Use it to turn a timing question into a reproducible engine experiment. Visual rehearsal and combat behavior belong in Action Director and the host game. ## Start in a browser For direct-file use, open `index.html` from this folder in a modern browser; keep `core.js`, `app.js` and `style.css` beside it. The localhost launch path below is the supported setup. All processing is local. No package installation, CDN, account, upload or server API is used. Save a lab project before closing the tab; the tool does not autosave. For a localhost preview, run from this folder: ```sh python3 -m http.server 4193 --bind 127.0.0.1 ``` Then open [the local tool](http://127.0.0.1:4193/). Stop the server with Ctrl+C. This is also an offline option once the folder and Python are installed. External documentation links require a connection. ## Reproduce the first experiment 1. Select **Load example**. Keep the simulation rate at 60 ticks/s. 2. Take A is startup 12 / active 6 / recovery 24: 42 ticks, 700 ms. First active tick: 12, or 200 ms after the start boundary. 3. Take B is 9 / 6 / 24: 39 ticks, 650 ms. Contact begins 50 ms earlier, with identical active and recovery counts. 4. Change B recovery to 18. The result becomes 33 ticks, 550 ms. Contact still begins at 150 ms. This isolates recovery from startup. 5. Save a `.lab.json` project. Reopen it using **Open lab project** to reproduce the counts. The supplied `examples/timing-study.lab.json` restores the initial example. 6. Choose 2D or 3D and select **Export .action.json**. The dimension sets the performer origin; it does not create a model or animation. Changing simulation rate keeps counts unchanged. Thus A takes 1,400 ms at 30 ticks/s and 350 ms at 120 ticks/s. This is a deliberate change in time, not a conversion preserving seconds. Export requires 60 ticks/s because ActionSpec 1.x requires it. Other rates remain useful for numerical comparison and lab saves. ## Continue in Action Director Use the [official Action Director source](https://github.com/juda8020/action-director) at the pinned revision in `UPSTREAM.md`, with Godot 4.7. Open the generated `.action.json` through the editor's action-file open control. Select Take A and compare with Take B. Add the animation, hitboxes and motion needed for your own test, then save as a new project. Nothing is imported into your game automatically. The export contains one performer, two takes and phase windows. There are no assets, hitboxes, damage values, audio files, branches, cancel windows or hitstop. Generic phase events do not implement combat rules. Use Action Director and the host game for those behaviors. Runtime handoff was checked with the pinned upstream codec and player; the entire graphical editor and downloadable alpha were not retested in this task. For A, inclusive phase ranges are 0–11, 12–17 and 18–41. `duration_ticks` is 42, a terminal boundary. No phase extends to tick 42. Runtime starts at tick 0 and reaches that completion boundary after 42 advances. For B, the corresponding boundaries are 0–8, 9–14, 15–38, completion 39. ## Inspect an existing action Choose **Inspect .action.json** and open `examples/upstream-sword.action.json`. Both takes have two ticks covered by multiple phase windows. Take A's three windows cover 73 unique tick positions including its terminal boundary, while its authored `duration_ticks` is 72. Take B also contains a branch. These are authoring observations, not proof that the upstream sample is broken. The inspector uses inclusive intervals. It reports union coverage and overlapping tick positions separately, so blindly adding phase lengths cannot silently misstate the total. It does not infer phases from hitboxes or clip names, follow branch execution, validate every payload, or offer a save action. The original file remains unchanged. A phase overlap can be intentional; decide in the editor. ## Limits and privacy - Two takes in the calculator; startup/recovery may be zero, active must be at least one tick. Each take is limited to 36,000 total ticks. - File input is capped at 1 MiB; the inspector caps 100 takes, 10,000 events per take and 36,000 for tick values. Larger productions need a separate batch tool. - The inspector handles ActionSpec 1.x timing structures only. A successful inspection is not full schema validation. Malformed phase data is rejected instead of repaired. - No geometry, blend curves, collision, hitstop, cancel conditions, network timing or input buffering simulation. A shorter duration is not evidence of better feel or balance. - User-supplied names are rendered as text, never HTML. No `eval`, external script, telemetry, fetch, cookies or localStorage. Local files stay in tab memory. Downloads require an explicit button action. - Supported target is modern desktop browsers on macOS, Windows and Linux. Verification used the macOS Codex browser and Godot 4.7; use the supplied runtime checks when moving to another environment. Phone layout was checked at 390×844, not on physical devices. ## Verify Node.js (with built-in `node:test`) and Godot 4.7 are development-only dependencies. The browser tool has zero package dependencies. ```sh node --test tests/core.test.cjs sh tests/run-godot.sh ``` Set `GODOT_BIN` when Godot is installed elsewhere. The Node suite also regenerates the supplied example exports. The Godot script copies only pinned runtime sources and fixtures into a disposable directory, imports class names, validates both dimensions, and checks phase start events and completion for both takes at 30/60/120 rendering FPS. Rendering FPS never changes the 60-tick simulation contract. The runner uses a disposable project, sets variant-inference diagnostics to warnings to match the unchanged upstream codec, and requires an explicit success marker. Set `TIMING_EXPORT_2D` and `TIMING_EXPORT_3D` to verify your own downloaded example files against the tutorial’s expected phase boundaries. ## Updates and attribution See `UPSTREAM.md`, `upstream-manifest.json`, `LICENSE` and `CHANGELOG.md`. The browser implementation is new companion code. It reuses the ActionSpec contract and includes unchanged upstream GDScript for reproducible verification; it does not claim to have invented Action Director. Next: use one real, owner-selected action to test whether this page saves a development step. Only then consider cancel-window experiments, a reviewed sprite-duration adapter, or shareable comparisons. Each new feature needs a reproducible input, an expected decision and evidence that the existing tool does not already solve it more simply.