init.luau
Versions
Every version of this package its world published, newest first by when it first appeared. A version published again later keeps its place.
flight: stop a subscriber from stalling the crane, and clamp the frame step A final validation run tripped the script watchdog inside Crane.update. Two causes, both fixed here. 1. Rules.events dispatched handlers synchronously on the emitter's stack, so the crane's update paid for every subscriber. Measured: 21 live crash handlers, four of them ~204ms each, well past the 1000ms watchdog. Dispatch now runs in one coroutine off the emitting frame, which keeps subscription order and the payloads exactly as they were. 2. Handlers accumulated because a component hot-reload re-runs awake() and never calls onDestroy() (#8444), so every save stacked another subscription and none were ever released. events:on(name, fn, key) now takes an optional stable key: re-registering under it replaces rather than stacks. The bus warns past 12 subscribers on a name, and events:counts() reports the live numbers. Handler counts went 21/20/20 -> 3/3/3. Crane.update also clamps its frame step to Rules.tune.maxFrameStep. Resuming after a pause hands it a dt of whole seconds, which carried the crane past a dozen gates in one frame -- scoring every one of them at once, and skipping the collision test straight through poles it never sampled inside of. A hitch now costs distance instead of teleporting the player.
01KZ7ASD68PCP2GNYGSSZWC7ZE2e8ba5e5edBrowse filesCompare with previousCompare from hereflight: tune the beat, make the course a course, forgive the corners Flight: rising and falling now use different gravities, so a flap pops and the fall has weight; one arc is ~1.5m over ~0.65s and that arc is the beat. Forward speed ramps 8.6 -> 10.8 m/s, so late gates arrive faster as well as tighter. Course: the gap centre is a bounded random WALK instead of a per-index hash, so neighbouring gates can no longer jump the arena; a step that would leave the safe band reflects off it rather than clamping. Three teaching gates dead level with the spawn, then one smoothstep ramp drives gap height, forward speed and gap wander together. Collision: the crane is a circle against rectangular poles, so clipping the tip of a pole diagonally costs nothing. hitRadius (0.40) is deliberately smaller than the crane's nominal craneRadius (0.55). Adds the nearMiss event slice C asked for, measured across a whole pass rather than one sampled frame. Adds runstate.module so that saving rules mid-session no longer orphans every subscriber (#8442). reset now precedes ready. Course reconciles when the window moves or on a slow tick instead of scanning every frame, and retries a gate whose art failed to build.
01KZ7A4Z7RH3H2D7YAMXVJ72NB39c98b408cBrowse filesCompare with previousCompare from hereplan: Paper Sky — scene, rules contract and playable skeleton
01KZ78E7VHDVK8HPAN6QX0X4442ea7536d78Browse filesCompare from here