Skip to content

Releases

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 17 Oct 01:09
2037a05
  • Web: a key pressed and released within a frame that runs no fixed step is no longer lost. It reads as down until the game reads it, so fast taps register on displays faster than the step rate.
  • doctor no longer crashes when scriptc is missing on a project with an iOS target; it warns with the install command. It also warns when scriptc is older than 0.2.1, the oldest that builds the templates, instead of reporting it as ok.
  • doctor drops the obj && expr native-trap rule: it flagged boolean && expressions that run fine natively, and the object case it targeted is now a scriptc compile error that the native compile check reports.

v0.3.5

Choose a tag to compare

@github-actions github-actions released this 13 Oct 04:24
97de89e
  • doctor also warns, instead of failing, when a native target has no vendored SDL3 and wgpu-native or no scriptc iOS runtime yet. A fresh project on a clean machine exits 0.

v0.3.4

Choose a tag to compare

@github-actions github-actions released this 13 Oct 04:15
5d7f429
  • dotframe new records replays/smoke.json (600 mashed frames) after installing, so bun run test verifies a golden replay from the first minute.
  • doctor passes on a fresh project: template placeholders (deploy scope, iOS bundle id and team) and tools or packs for a target you have not set up (scriptc, zig, xcodegen, vercel, agent-browser) are warnings now. Only Bun, config, sim and code problems fail.
  • Running dotframe without Bun prints how to install it instead of env: bun: No such file or directory. The npm bin is a small Node launcher (cli/bin.cjs) that hands off to Bun.

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 12 Oct 19:12
832e7d5
  • Web Canvas 2D fallback: without WebGPU (an older phone, an insecure http:// origin, no adapter) run() draws 2D games through Canvas 2D instead of throwing. createDraw2D returns the Canvas 2D Draw2D for that gpu, with the same coordinates, state rules and SDF text layout (glyph masks are rendered from the atlas on the CPU and cached), so games need no changes. 3D calls throw "needs WebGPU" and the page says so. ?renderer=canvas2d forces it for testing.

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 11 Oct 22:38
b3ed9b9
  • Netplay owner option for turn-based games: the port whose input the next step uses, read from the sim. The other port's input is fed as neutral on both peers, so the player with the turn never waits for the network, and the other peer plays the turn back as it arrives instead of predicting and rolling it back. owner may return NOBODY for frames that use neither input (a countdown), which never wait either. Craft Ones on a 2-second round trip: the shooter plays every turn with 0 stalls.
  • Netplay heals a gap in the link: each input message carries got (how many of the peer's inputs arrived in a row) and inputs are resent from there, instead of only the last 8 frames. A socket that dropped for 3 seconds used to stall the match forever.
  • connectRelay and connectRelayNative reconnect a dropped socket to the same room and slot (status connecting meanwhile). The relay takes ?slot= for the slot a client had and ?client= so a new socket replaces one it still thinks is open, without the peer hearing that it left. Older relays still pair a returning client, into whichever slot is free.

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 10 Oct 06:25
5ab0d2a
  • dotframe skills get covers 0.3.0: per-view lights and limit warnings, glow particles, material vertex(), culling, src/rig, music channels, left-aligned UI, persistent Storage, assets slim --decimate, and the iOS aborts the web tolerates (out-of-range reads).

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 06:21
3fa1a23
  • Point lights picked per view (pickLights): unlit lights and lights out of the frustum drop, and past MAX_LIGHTS the nearest to the eye win. Scenes with 8 or fewer lights in view are unchanged.

  • Glow particles: Environment.glow draws billboards additively (PipelineOptions.additive, web and native), fading to nothing in fog; Emitter.colors is a color ramp over the life and Emitter.radius spawns inside a sphere.

  • A material may define fn vertex(position, time, params0, params1) -> vec3f to move its mesh's positions before the model transform and skinning, on static and skinned meshes.

  • Static meshes are culled against the frustum and anything scaled to zero is skipped; skinned meshes are always drawn. The Ones' night 4 runs at 60 fps on an iPhone 15 Plus.

  • iOS keeps Storage in the app's preferences (src/native/storage.ts, shared with macOS and Windows), so saves survive quitting the app.

  • replay verify --native reads each replay's inputs and checksums from files next to the binary instead of one huge literal: 33 replays verify in 15 s on scriptc 0.2.7, which never finished compiling the old entry.

  • Limits that drop things warn once: spot lights past MAX_SPOTS, fog volumes past MAX_FOG_VOLUMES, joints past MAX_JOINTS, iOS library mode past 28 of its 32 callbacks, and a plan wait that hits its default 6000 frames.

  • dotframe/src/rig: posing a skeleton by hand (createRig, solve, turn, aim, headLook, stare, snap, follow, twoBoneIk, lockRoot, eulerYXZ). twoBoneIk also bends a leg that is straight at rest.

  • Four music channels: playMusic, stopMusic, pauseMusic and setMusicVolume take an optional channel (default 0, so existing games are unchanged), streamed together on web and mixed in df_audio.c natively with no new iOS callback.

  • UiStyle.align: "left" and pad: labels at the item's edge and a row's value with its arrows on the right, for settings lists.

  • Fixed: on the web a key pressed and released between two frames was never seen; it now reads as down for one frame.

  • assets slim --decimate <ratio> or --decimate file.glb=ratio,...: quadric edge collapse in TypeScript for static and rigid-skinned meshes (welded across seams, rims slide along themselves, flips rejected, unused vertices dropped). dotframe.json assets.decimate applies it to iOS bundles. The Ones' tripod went from 9.2 MB to 3.8 MB at 0.35.

  • Volumetric fog stand-in: Environment.fog.scatter adds the light the fog throws toward the eye, so point lights get halos (PointLight.fog scales each one, like Godot's light_volumetric_fog_energy), and fog.volumes adds up to MAX_FOG_VOLUMES boxes of thicker fog with a height falloff (Godot FogVolume). Both are closed-form per fragment, no extra pass and no samples, so phones run the same code. Off by default; scenes without them render as before.

  • Several spot lights: Environment.spots lights together with spot, up to MAX_SPOTS (4). The first spot that asks for shadows gets the shadow map and the others light without shadows, on every platform, so phones pay one map as before; each extra spot costs a few ALU ops per fragment. The Ones lights the flashlight and the camcorder IR at once.

  • Custom material shaders: Renderer.createMaterial(wgsl) takes a WGSL fn surface(s: SurfaceIn) -> Surface (Godot's fragment(): albedo and emission from the world position, normal, UV, view vector, MeshRef.color, eight floats of MeshRef.params, time and the mesh texture), and MeshRef.material draws a mesh with it on static, skinned and instanced meshes. Built-in lighting, shadows, fog and exposure apply unchanged; meshes without a material keep the same shader and uniforms. One pipeline per material and mesh kind, made on first draw; phones run the same shader with no extra pass. The Ones ports one_skin.gdshader with it.

  • Post passes render at 0.75 of the asked size on mobile (gpu.mobile, POST_MOBILE_SCALE). On an iPhone 15 Plus, The Ones' camcorder viewfinder (a second full-screen pass) went from p95 21 ms with 146 ms spikes to p95 17.0 ms.

  • perf sets the viewport before opening the game and draws 30 untimed frames at --frame before measuring: runs used to start with up to nine one-second "hitches" from the resize and the first shader compiles.

  • Fixed: one renderer drawing two worlds (an in-game TV's set and the scene) reused per-entity GPU buffers across them, since both number entities from 0; buffers are now keyed by World.id too.

  • Renderer.updateInstances(set, data) rewrites an instance set in place (same count). Camera.aspect draws into a target of another shape than the surface, Camera.roll turns the view about its direction, and Camera.fixed keeps a camera inside the scene (one filming an in-game TV) from being replaced by snap --camera.

  • Render layers: MeshRef.layers and Camera.layers (bitmasks, default 1), like Godot's layers and cull mask. A mesh off layer 1 casts no shadow. The Ones uses it for what only the camcorder shows.

  • replay record --plan plan.json: go, look, press, wait (frames or until a state() path has a value) and expect steps, each able to hold named buttons ("with": ["crouch"]), steered through the new optional Sim.pilot and SimRun.pose. Replaces hand-tuned inputs and per-replay route scripts (The Ones had five copies of one). A failed step names its frame and writes nothing.

  • assets font --chars-from collects every character past Latin-1 (it skipped U+0100 to U+02FF, so ō, ā, ł and ş never baked: The Ones' "Gorō (shōbōdan)" drew as "Gor (shbdan)"), and the baker leaves out characters the font lacks instead of baking its .notdef box, and says how many.

  • replay verify --native compiles the sim with scriptc and runs each replay there, one process per replay, reporting the frame an abort happened after. doctor runs it over replays/*.json as native-replays, and CI runs it on the templates. Bun replays had passed The Ones' 15 replays while the iPhone aborted in a dialog.

  • MeshRef.emissive glows with the texture (surface color times emissive), so a textured emitter keeps its pattern; untextured meshes look the same as before.

  • fitFootprint(model, length) in src/model: scales a flat prop by its longest horizontal side.

  • The template's gitignore ignores only snaps in the repo root (/*.png); *.png hid every PNG asset, so a fresh clone lost the HUD font and textures.

From porting The Ones (Godot, first-person 3D horror) to dotframe.

  • Native sound effects stay 16-bit in their own channel count instead of float stereo, a quarter of the memory for mono files. The Ones' decoded audio went from about 159 MB to 40 MB.

  • Environment.sky: a procedural sky drawn behind the scene in its own pass: zenith to horizon gradient (Godot's sky_curve), ground, sun disc, a textured moon, twinkling stars, a Milky Way band and a low horizon glow, tonemapped like the scene.

  • assets slim: copies assets for shipping, with GLBs cut to what loadGlb reads (unused maps, tangents and UV sets dropped, 16-bit indices when they fit) and opaque PNG textures recoded as JPEG through ffmpeg. The web template and iOS builds use it. The Ones' models went from 15.2 MB to 8.7 MB with the same loadGlb output.

  • deploy links the build folder to deploy.project before deploying, so vercel 60 no longer uploads the repo root or links a project named after the folder. The template's build-web.ts keeps dist/web/.vercel.

  • doctor: native-traps:<target> warns on code that aborts natively while web passes (unguarded Record reads into a variable or argument, obj && expr as a value; silence a line with // dotframe-allow-native). tool:xcodebuild runs xcodebuild -version. build, device and doctor use Xcode when xcode-select points at Command Line Tools.

  • snap fails with the WGSL error and line instead of a black frame (gpuErrors in web/run), uses one browser session per run (back-to-back snaps timed out), and a timeout prints the page console.

  • Native mouse look: reading input.look() arms capture; a click enters relative mode, Escape or focus loss releases.

  • iOS launch screen: launchColor and an optional launch image, shown while init loads.

  • dev reports PORT_IN_USE; desync on a single-player sim points at doctor; Windows builds name the runtime pack version mismatch and the macos skill; src/native is type-checked in CI.

  • 3D under a 2D HUD in one frame: Renderer.draws() returns a scene's draws without presenting, Draw2D.scene(draws) queues them before the 2D batch, and both backends split a frame into passes when depth and non-depth pipelines mix (native: df_pass). Sim.render(draw) is unchanged, so snap and doctor work for 3D games.

  • Renderer: triplanar textures (MeshRef.texture, tile), emissive, and an optional Environment (ambient, sun, up to 8 point lights, a spot light, fog, ACES exposure); Camera.near/far. Without an environment the old look is kept.

  • glTF: loadGlb loads whole models (nodes, materials, embedded images, alpha modes, rest-pose skins); src/model.ts uploads and spawns them fitted to a height.

  • Skeletal animation: src/anim.ts (clip sampling with crossfade weights, joint matrices) and a GPU-skinned pipeline (addSkinnedMesh, MeshRef.joints).

  • Audio: steerable looping voices (start, setVoice, stopVoice) and spatial().

  • Post-processing: gpu.createTarget and gpu.frame(clear, draws, target) render into textures; src/post.ts runs a full-screen pass with your WGSL. RenderGpu.createTarget and destroyTexture are now required (scriptc cannot call optional functions): custom stub GPUs need both.

  • Mipmaps (createTexture/createImage mipmaps flag), instancing (addInstances, MeshRef.instances, sway, Environment.time) and spot light shadows (SpotLight.shadows, a 1024 shadow map with 4-tap PCF). bind takes an optional second texture (bindings...

Read more

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 05 Oct 04:45
5d8306d

From Craft Ones' asks (rounds 7 and 8).

  • Native textures grow without a cap (it was 256, and iOS aborted with no message past it); gpu.destroyTexture(texture) frees one and the bind groups that sample it.
  • iOS: build ios wraps init and frame so a TypeScript throw prints its message and stack before scriptc's trap aborts; dotframe device logs <target> copies the newest crash report from the device and summarizes it.
  • Native online play: dotframe/src/native/relay (connectRelayNative, the same RelayLink as the web, polled per frame) over a WebSocket client in C (NSURLSession on macOS and iOS, WinHTTP on Windows), and shareText (share sheet on iOS, clipboard on desktop). play --online --native runs a web peer against the macOS build. Inside a scriptc executable, hostnames and TLS do not connect yet (reported to scriptc); IP addresses and localhost do.
  • iOS library callbacks stay under scriptc's 32: the glue registers only the host functions the entry reaches, music and volume are one call, and networking is two.
  • dotframe/src/ui: buttons and arrow rows laid out once for drawing and hit-testing, focus, taps from mouse and touch, and a release gate so the press that starts a match does not reach gameplay.
  • Web: run(window, setup, { fit: "window" }) fills and follows the browser window; Draw2D.resize; templates refit on shape changes and use it.
  • doctor compile-checks each native target with scriptc (no C, no link), so patterns that only fail natively show up before building for the phone.
  • deploy init --site <dir> [--path /play/] serves a static folder at / with the game at a subpath.
  • dotframe config set vendor <dir> stores the vendor dir per machine (~/.dotframe/config.json).
  • Fixed: the native templates trapped at startup since 0.1.7 (a setup function passed to run() with a narrower parameter type, and, since 0.1.9, the probe assigning globalThis). The probe no longer touches globalThis (publishProbe from dotframe/src/probe-web does, on the web), and CI now runs each template binary.

v0.1.9

Choose a tag to compare

@github-actions github-actions released this 05 Oct 03:16
5bd3f36

The rest of round 7, which missed the 0.1.8 merge.

  • dotframe/src/probe: createProbe() publishes globalThis.__dotframe for play --online, and createMasher(seed, random) gives scripted inputs, so games do not write either by hand. Templates use them.
  • play --online --seeds a,b picks each peer's mash seed.
  • doctor fails on the template's placeholder iOS bundle id (com.example.*), which Apple will not register.

v0.1.8

Choose a tag to compare

@github-actions github-actions released this 05 Oct 03:07
bcec9ba

From dogfood round 7 (Craft Ones on 0.1.7).

  • doctor sim:math skips files marked // dotframe-allow-math-file, for render-only files the sim reaches because it builds the renderer.
  • deploy init pins images: bun from packageManager (game or repo root, else the local bun) and the relay's dotframe from the version installed in the game.
  • The vendor fix (doctor and native builds) names DOTFRAME_VENDOR for reusing an existing vendor dir.