Repository navigation
Releases
v0.3.6
- 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.
doctorno 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.doctordrops theobj && exprnative-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
doctoralso 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
dotframe newrecordsreplays/smoke.json(600 mashed frames) after installing, sobun run testverifies a golden replay from the first minute.doctorpasses 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
dotframewithout Bun prints how to install it instead ofenv: 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
- 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.createDraw2Dreturns 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=canvas2dforces it for testing.
v0.3.2
- Netplay
owneroption 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.ownermay returnNOBODYfor 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. connectRelayandconnectRelayNativereconnect a dropped socket to the same room and slot (statusconnectingmeanwhile). 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
dotframe skills getcovers 0.3.0: per-view lights and limit warnings, glow particles, materialvertex(), culling,src/rig, music channels, left-aligned UI, persistentStorage,assets slim --decimate, and the iOS aborts the web tolerates (out-of-range reads).
v0.3.0
-
Point lights picked per view (
pickLights): unlit lights and lights out of the frustum drop, and pastMAX_LIGHTSthe nearest to the eye win. Scenes with 8 or fewer lights in view are unchanged. -
Glow particles:
Environment.glowdraws billboards additively (PipelineOptions.additive, web and native), fading to nothing in fog;Emitter.colorsis a color ramp over the life andEmitter.radiusspawns inside a sphere. -
A material may define
fn vertex(position, time, params0, params1) -> vec3fto 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
Storagein the app's preferences (src/native/storage.ts, shared with macOS and Windows), so saves survive quitting the app. -
replay verify --nativereads 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 pastMAX_FOG_VOLUMES, joints pastMAX_JOINTS, iOS library mode past 28 of its 32 callbacks, and a planwaitthat hits its default 6000 frames. -
dotframe/src/rig: posing a skeleton by hand (createRig,solve,turn,aim,headLook,stare,snap,follow,twoBoneIk,lockRoot,eulerYXZ).twoBoneIkalso bends a leg that is straight at rest. -
Four music channels:
playMusic,stopMusic,pauseMusicandsetMusicVolumetake an optional channel (default 0, so existing games are unchanged), streamed together on web and mixed indf_audio.cnatively with no new iOS callback. -
UiStyle.align: "left"andpad: 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.jsonassets.decimateapplies 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.scatteradds the light the fog throws toward the eye, so point lights get halos (PointLight.fogscales each one, like Godot'slight_volumetric_fog_energy), andfog.volumesadds up toMAX_FOG_VOLUMESboxes of thicker fog with a height falloff (GodotFogVolume). 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.spotslights together withspot, up toMAX_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 WGSLfn surface(s: SurfaceIn) -> Surface(Godot'sfragment(): albedo and emission from the world position, normal, UV, view vector,MeshRef.color, eight floats ofMeshRef.params, time and the mesh texture), andMeshRef.materialdraws 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 portsone_skin.gdshaderwith 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. -
perfsets the viewport before opening the game and draws 30 untimed frames at--framebefore 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.idtoo. -
Renderer.updateInstances(set, data)rewrites an instance set in place (same count).Camera.aspectdraws into a target of another shape than the surface,Camera.rollturns the view about its direction, andCamera.fixedkeeps a camera inside the scene (one filming an in-game TV) from being replaced bysnap --camera. -
Render layers:
MeshRef.layersandCamera.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 astate()path has a value) and expect steps, each able to hold named buttons ("with": ["crouch"]), steered through the new optionalSim.pilotandSimRun.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-fromcollects 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 --nativecompiles the sim with scriptc and runs each replay there, one process per replay, reporting the frame an abort happened after.doctorruns it overreplays/*.jsonasnative-replays, and CI runs it on the templates. Bun replays had passed The Ones' 15 replays while the iPhone aborted in a dialog. -
MeshRef.emissiveglows with the texture (surface color times emissive), so a textured emitter keeps its pattern; untextured meshes look the same as before. -
fitFootprint(model, length)insrc/model: scales a flat prop by its longest horizontal side. -
The template's gitignore ignores only snaps in the repo root (
/*.png);*.pnghid 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 whatloadGlbreads (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 sameloadGlboutput. -
deploylinks the build folder todeploy.projectbefore deploying, so vercel 60 no longer uploads the repo root or links a project named after the folder. The template'sbuild-web.tskeepsdist/web/.vercel. -
doctor:native-traps:<target>warns on code that aborts natively while web passes (unguardedRecordreads into a variable or argument,obj && expras a value; silence a line with// dotframe-allow-native).tool:xcodebuildrunsxcodebuild -version.build,deviceanddoctoruse Xcode when xcode-select points at Command Line Tools. -
snapfails with the WGSL error and line instead of a black frame (gpuErrorsinweb/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:
launchColorand an optionallaunchimage, shown whileinitloads. -
devreportsPORT_IN_USE;desyncon a single-player sim points atdoctor; Windows builds name the runtime pack version mismatch and themacosskill;src/nativeis 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, sosnapanddoctorwork for 3D games. -
Renderer: triplanar textures (
MeshRef.texture,tile),emissive, and an optionalEnvironment(ambient, sun, up to 8 point lights, a spot light, fog, ACESexposure);Camera.near/far. Without an environment the old look is kept. -
glTF:
loadGlbloads whole models (nodes, materials, embedded images, alpha modes, rest-pose skins);src/model.tsuploads 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) andspatial(). -
Post-processing:
gpu.createTargetandgpu.frame(clear, draws, target)render into textures;src/post.tsruns a full-screen pass with your WGSL.RenderGpu.createTargetanddestroyTextureare now required (scriptc cannot call optional functions): custom stub GPUs need both. -
Mipmaps (
createTexture/createImagemipmapsflag), instancing (addInstances,MeshRef.instances,sway,Environment.time) and spot light shadows (SpotLight.shadows, a 1024 shadow map with 4-tap PCF).bindtakes an optional second texture (bindings...
v0.2.0
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), andshareText(share sheet on iOS, clipboard on desktop).play --online --nativeruns 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. doctorcompile-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 (
publishProbefromdotframe/src/probe-webdoes, on the web), and CI now runs each template binary.
v0.1.9
The rest of round 7, which missed the 0.1.8 merge.
dotframe/src/probe:createProbe()publishesglobalThis.__dotframeforplay --online, andcreateMasher(seed, random)gives scripted inputs, so games do not write either by hand. Templates use them.play --online --seeds a,bpicks each peer's mash seed.doctorfails on the template's placeholder iOS bundle id (com.example.*), which Apple will not register.
v0.1.8
From dogfood round 7 (Craft Ones on 0.1.7).
doctorsim:math skips files marked// dotframe-allow-math-file, for render-only files the sim reaches because it builds the renderer.deploy initpins images: bun frompackageManager(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_VENDORfor reusing an existing vendor dir.