Skip to content

v0.106.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 15:48
· 308 commits to master since this release

Added

  • A native build's sockets connect to wss://. createSocket({ url: 'wss://…' }) now opens on the desktop, iOS and Android runtimes, where it used to report that only ws:// is supported and close. TLS is the operating system's, as it already is for fetch: Network.framework on macOS and iOS, Schannel on Windows, libcurl on Linux and the platform's SSLSocket on Android, under the same WebSocket framing a ws:// connection uses. The certificate chain and the host name are checked against the system's trust store; a connection that fails either reports the reason as an error event and closes with 1006. With no port in the URL a wss:// connection goes to 443. Windows, Linux and macOS were run against trusted, untrusted and wrong-host servers; the Android and iOS code was compiled and has not yet been run on a device.
  • A model's paint can have a clear coat. A model source's material takes coat (0 to 1) and coatRoughness: a thin glossy layer over what is under it, which is what gives lacquered armour its sharp highlight while the paint below stays as rough as it is.
  • A space frigate example, built from a recipe. examples/space-frigate flies a frigate past a gas giant with no hand-painted texture and no model from another tool: its hull, plating, worn paint, windows, running lights and engines are steps of one model source, baked to a five-thousand-triangle mesh and five 4096 maps; the asteroids it flies through are three more model sources, drifting aft with its speed; the nebula and the planet's bands are generated; the stars are the Starfield effect; the planet's air and the engine plumes are two small shaders. A camera tours six shots on its own, and the keyboard and mouse take it over and work the throttle. One script regenerates every asset, and two more capture frames and check the controls in a headless browser.
  • Stars that stay points. The new Starfield post-process effect draws stars a pixel or two across at any resolution and any field of view, in three layers of brightness, warm and cool, with a band where they crowd (u_band, its tilt and turn) and params for density, size and brightness. With u_sunSize above 0 it also draws the scene's sun, the first directional light, as a disc of that many degrees with a glow round it (u_sunGlow), bright enough for bloom to take. It is added over whatever sky is already drawn, so it goes on top of an environment's panorama: a nebula from an imported HDR keeps its soft cloud and no longer has to hold its stars at the panorama's resolution, where each was a blot several pixels wide. A sky a project writes with defineSkyEffect can do the same with over: true, and reads esSkyPixel, the angle one pixel covers, to size what it draws.
  • A stain can be as fine as the map it is baked into. A stain step given texel: true is no longer laid on faces: it is worked out for every texel of the map a normalBake with color or surface writes, over what the faces were painted, in the order the stains are written. Chipped paint, scratches and grime come out at the map's resolution on a model of a dozen faces, where a stain on faces had to split them first and stopped at a million and a half triangles. where: "edges" and where: "cavity" read the dense surface's shape around each texel, so wear follows a plate's rim and dirt its seam whatever the faces are. With where and a pattern, fray (0 to 1) lets the pattern move the line the shape draws instead of cutting holes in it, which is how paint wears off an edge.
  • Plating for hard surfaces. The new panels step cuts flat faces into plates about size across (uneven in how they vary, repeatable by seed), leaves a gap between them, stands each height out or sinks it, rounds its top with a bevel, and gives the plates tones of difference in their paint: a hull, armour, paving. It goes before a decimate, and normalBake carries it onto the thin mesh.
  • Parts of a model can glow. paint and stain take glow (0 to 1): how much of the material's emissive those faces or texels give off. A normalBake with color writes it as an emissive map beside the others, and the model's material reads it: lit windows, running lights and an engine's throat on one mesh, with the rest of it dark.
  • Models bake without the editor. node pipeline/bin/estella.mjs bake-model <file.esmodel> writes what the editor writes for a still model: its mesh, the maps its normalBake asks for and its material, each with its .meta. --sheet <file.png> also writes the four-view contact sheet. import-hdr takes --sky-width for a sky sharper than the default 2048.
  • Pictures draw without the editor. node pipeline/bin/estella.mjs draw-image <file.esimage> <out.png> draws a picture source as a device draws it and writes the PNG, in a fraction of a second: the pictures and recipes it lays in are read from its project, and what a layer that drew nothing says is printed. --on <#colour> lays it on a ground, as a translucent interface picture is seen; --zoom <x,y,w,h> enlarges a part with hard pixels. A picture with text is not drawn there, as a command line has no fonts.
  • Particles glow in HDR, fade into the scene and wear away. A ParticleEmitter gains intensity, a multiplier on its particles' colour that goes past 1 in linear colour space, so a spark is bright enough to bloom. A particle material's fragment now receives v_particle (normalized age, a random number the particle keeps, its lifetime), and the new Particle shader (builtin:particle) uses them: u_softness fades a particle as it nears the opaque scene behind it, so smoke no longer cuts a hard line into the ground, and u_erosion wears its texture away with age. A draw whose material reads u_sceneDepthMap is now handed the scene's distances whether or not anything refracts; before, only a frame with water in it took that copy. distanceToEye, sceneUv and sceneDistance are available to every shader for reading it.
  • A material can bend the picture behind it. The new Distortion shader (builtin:distortion) draws what the frame has already drawn, displaced: heat haze over embers, a shockwave, a lens, on a mesh or as particles. It reads u_screenColor, a new input any shader can declare: the whole frame as drawn so far, particles and other blended draws included, where u_sceneColor is only the opaque scene behind a surface. Such a draw is made after every other.
  • A VFX showcase example. examples/vfx-showcase loops one effect built from those pieces: an energy core charges over a rune circle while sparks spiral in, detonates into a shockwave that bends the air and the ground's picture, and leaves bouncing sparks, drifting embers, a fireball turning to smoke that fades into the floor, heat haze and a cooling scorch.
  • Palette widgets and templates can be dropped into the Outliner. Dropped onto an entity, a widget or template dragged from a palette is created as that entity's child; onto empty space or a folder it lands where a click would put it. A UI widget only takes a parent inside a Canvas: any other parent is passed over for the Canvas, made if the scene has none, so a widget dropped under a plain entity is not left unable to lay out.
  • Double-clicking an entity in the Outliner frames it. The viewport frames the entity, as F does and as the common editors do. Renaming an entity stays on F2 and the context menu; a folder row has nothing to frame and still renames on double-click, and the twist, lock and eye do not frame when clicked twice quickly.
  • A navigation grid can lie on the ground of a 3D scene. NavGrid takes plane: 'xz': its columns run along world x, its rows along world z, and every waypoint comes back at the height of its origin. Until now a grid lay in x/y only, so a 3D game that builds on a grid had to bake a navigation mesh, which is rebuilt whole on each change, or keep its agents on a hidden plane. Agents on such a grid are steered in x/z, a NavObstacle or NavArea marks the cells under its x and z, and editing a cell re-plans the routes that crossed it, as on a flat grid. A grid that names no plane is unchanged.
  • Assets register without the editor. node pipeline/bin/estella.mjs adopt <projectDir> gives every content file with no .meta the one the editor writes when it opens the project, and lists what it registered. Until now a file added outside the editor (a picture source written by hand, a font copied in) was unknown to the project, an export left it out silently, and the game found out on the device. An export now also warns for each file a script names whole that has no .meta.
  • A world marker stays off the HUD's own panels. UIWorldAnchor takes edgeInsets (left, top, right, bottom, in layout pixels over edgeMargin): room a clamped marker never stands in, so an objective marker pinned to the screen's edge does not land on a gauge or a status panel. It also reads back clamped, true while the node stands where the clamp put it and not over its point: the moment to show an arrow in place of a bracket. placeOnScreen takes the same insets.
  • What texture recipes cost can be read. textureRecipeStats() is exported: how many pictures a game drew from their .esimage on the device, how many milliseconds that took, and how many were read back from the content cache instead. A cooked web game's headless handle answers the same as recipes(), for a script that measures a load.
  • The space frigate flies with a HUD, drawn from recipes. examples/space-frigate now carries a heads-up display with no painted bitmap in it: twenty-one picture sources (assets/ui/*.esimage, written by tools/hud-generate.mjs) are drawn on the device when the game loads. A speed gauge fills round three quarters of a circle in segments, with the commanded thrust marked against the thrust reached and the last stretch in amber; a nine-sliced panel shows drive, reactor, capacitor and nozzle temperature as bars that light a whole cell at a time; a waypoint ahead of the bow is bracketed while it is on screen and becomes an arrow at the screen's edge, clear of the panels, when it is not; a tag rides the planet's horizon; the corner blocks name the ship, the mission clock and the camera. The asteroids are targets: the nearest in view is bracketed, others carry small marks unless the hull hides them, a click on one or T locks it (the bracket closes on it and a card gives its range, how fast it closes or opens, and its size) and R lets it go; a tactical scope under the ship plots every rock within two kilometres, with a stem for its height above or below the ship; a log keeps the last few events, and the display runs a short self-test when it comes up. The display stands in depth: the corner panels lean inward in true perspective, the scope is a disc lying flat with each rock's stem standing on it and a sweep going round, the gauge's rings and figures float above its dial, and the whole of it sways a little against the camera's turning. src/hud.ts builds all of it in code under a Canvas and reads the flight state each frame. Text is set in Chakra Petch (SIL Open Font License, shipped beside its licence). The display is seen through a lens: its Canvas carries a CanvasEffect whose material (assets/ui-effects/lens.esshader) bends its corners a little, splits its colours toward the edges, lays scan lines over it and gives it a soft halo; the ship-systems panel is frosted glass over the frame behind it (assets/ui-effects/frost.esshader); and the markers that stand on the rocks, the waypoint and the planet are on a Canvas of their own that the lens does not bend, so each stays on what it marks.
  • Screen UI can stand in depth. ScreenOverlay.perspective is the distance, in layout pixels, from the eye to the screen plane, as CSS perspective is: with it set, a UI node turned about its x or y axis, and everything under it (text, nine-slices, filled visuals), is drawn foreshortened, and a node moved along z draws nearer or further. What lies in the screen plane is drawn exactly where it was, and the default of 0 keeps a screen flat. A panel can lean inward like a cockpit console, and a dial can lie flat like a table, with no render texture.
  • A Canvas can be drawn through a material, and UI can read the frame under it. CanvasEffect on a screen Canvas takes a material with a PostProcess shader: the screen UI on that Canvas's sorting layer is drawn into a transparent picture of its own and the material lays that picture on the frame, so a whole HUD can bend like a visor, split its colours, carry scan lines or glow as one picture, which no element can do alone. The shader reads the layer as u_texture, its colour weighted by its alpha and in the display's own values in a linear project too, with u_time, u_viewport and the material's params; returning the sample unchanged draws the Canvas as it is drawn without the component, a draw that only adds light still only adds light through the layer, and layers without an effect are drawn first and straight, so a marker that stands on something in the world is not moved off it. The component is scene data like any other. And a UI material that declares u_screenColor is handed the frame as it stands when its layer starts to draw: every camera, the post chain and the screen UI layers drawn before it, in the display's colours, with a full mip chain, so one textureLod at level 3 or 4 is the wide blur of a frosted panel. Until now that input was filled only inside a camera's scene pass, and a UI material that asked for it read white. A WebGPU surface is set up to be copied from on the frame after something first asks. Both on WebGL2 and WebGPU.
  • The space frigate mines its asteroids. With a rock locked and within fifteen hundred metres, holding F fires a mining beam from whichever turret has a clear line to it: the beam, the glow and sparks where it lands and the burst when the rock breaks are one prefab (assets/fx/mining.esprefab) made in code, with no change to the scene. Firing draws the capacitor down and heats the emitter, which cuts out when it overheats or the capacitor runs low; a broken rock puts its ore in a forty-tonne hold, by its class (carbonaceous, silicate, iron-nickel), and drifts back in from the far end of the field. The systems panel shows the capacitor and the emitter as they are, and the target card shows a rock's class, whether it is in range and how much of it is left.
  • The space frigate can be flown. The arrow keys turn the frigate (it banks into a turn), B brings the bow round onto the navigation gate and V onto the locked rock; the asteroids, the gate and the camera's frame all move against the ship's heading, so the field is flown through and not only watched. The gate is a place: its range and time to arrive are real and run down as the ship closes, and reaching it delivers the hold's ore and sets the next gate. Distances on the display are in the same metres the speed is, and the scope turns with the bow.
  • The space frigate is steered by orders that hold. A helm desk sits flat at the foot of the screen, either side of the tactical scope: an engine telegraph (stop, a quarter, a half, three quarters, full), a rudder strip (ten, twenty or thirty degrees to port or starboard) and an elevation ladder (level, fifteen or thirty degrees up or down). A click on a step sets it and the ship keeps to it with nothing held; W/S and the arrow keys move an order one step a press, and X puts the rudder amidships. Each ladder marks what was ordered beside what the ship is doing. Locking, mining, releasing, closing on the target and turning for the gate are controls on the desk too, lit while they are on, and F now switches the beam on and off instead of being held.

Changed

  • A texture ships at the size it was made. Max Size now starts at Source size for every texture; a picture's used to start at 2048, and a build shrank anything larger to it without a word. A 4096 map made on purpose now ships as 4096. A .meta that already states a Max Size keeps it (every texture imported before this states 2048), and a platform override still caps a mobile or mini-game build: set one there where memory or download size is tight.
  • A model bakes on every core, and keeps what it measured. bake-model spreads the slow parts of a normalBake over the machine's cores: reading the dense surface at each texel, reading the shape round it for a stain's where, casting the rays of occlusion, and working the stains out. --jobs <n> says how many. What the first two measured is kept under the project's .esengine/cache/model-bake/, so a bake after changing a stain's colour, pattern or softness, or the material, reads it back instead of casting it again, and one that widens a stain's faces casts only what is new; --no-cache casts all of it. The maps are byte for byte what one thread writes. Reading the shape round a texel is also 4.7 times less work: the triangles near it are gathered once and all its rays met against them, where each ray used to search the whole model. The frigate example's 4096 maps took eleven minutes on one core of a ten-core machine; they take 55 seconds the first time and 21 after. The editor's own write of a model is as it was.
  • A tree has bark. The picture a tree step's model is given holds bark along its top, and the wood reads it along each limb and round it, so the grain runs up a trunk and out along a branch: barkStyle is furrowed (the default), banded (a birch) or smooth, tinted by bark. The leaf square stands clear of every edge of the picture, and decimate keeps each corner's own place in a picture and its own light.

Fixed

  • A texture larger than 4096 by 2048 can be compressed. The texture encoder takes at most twelve million texels at once, and the cook answered a 4096 square image with "encoder produced 0 bytes" and left it out of the package. Nothing met this while every picture was capped at 2048. An image past the limit is now encoded in strips and put back together as one texture with its whole mip chain; it reads back texel for texel as one encoded whole. This holds for UASTC; an ETC1S texture that large is refused with what to change.
  • A model baked past 2048 keeps its maps' size. A normalBake of 4096 wrote 4096 maps and left them at the default Max Size, so a build shipped them at half their resolution. The bake now states each map's own size as its Max Size, from the command line and in the editor.
  • Textures in a web build stay sharp on a surface seen at a slant. An image the SDK uploads to WebGL2 itself (every compressed texture of an exported game, and every decoded PNG) was given its filters and mipmaps and never its anisotropy; only textures the engine created natively had it. A hull, a floor or a road seen edge-on was averaged to its footprint's long side and washed out, in the exported game and not in the checks that draw through the engine's own upload. Those textures now take up to sixteen samples along the slant where they are mipmapped and read linearly.
  • Textures the editor shows as a build ships them are decoded off the main thread. Where a texture ships as a PNG (resized, or with the colour under its clear texels filled in), the editor draws that PNG, and the loader was handed its bytes in memory. It wrapped them in a blob: address and fetched them back, which the editor's content security policy does not allow a page to do: every such texture logged a policy violation to the console and was then decoded through an <img> on the main thread, the stall 0.105.0 had moved textures away from. Bytes already in memory are now decoded as they stand, with nothing fetched; an <img> is used only where the browser cannot decode them that way.
  • A scene whose only atmosphere effect is Snow Cover exports with its shader. A lean web or minigame package takes its post-process shaders by the effects its scenes name, and the table that says which group an effect is in had no entry for snowCover: a scene using it and no other sky, fog or rain effect was packaged without it, and the effect failed when it first compiled. Every effect that compiles shaders of its own is now in the table, and a test reads the engine's list of effects against it.
  • A popped-out panel hears its own keys and drags. A panel popped out into its own window lives in that window, and five places listened on the main one instead: scrubbing or resizing a frame on the Flipbook lane stopped following the pointer, the Input Map's "press a key" capture never saw the key, the arrow keys in a dropdown always jumped to the first or last option, a locale table cell being typed in could be overwritten by a refresh, and the Output Log's Copy had nothing to copy. Each now reads the window its panel is in.
  • A spawn or frame-end callback that unsubscribes itself no longer makes the next one miss that call. world.onSpawn and app.onFrameEnd removed a callback from the list being walked, so the callback registered after one that unsubscribed during its own call was skipped for that spawn or frame; both now keep the list as world.onDespawn already did. A static batch that fails while it is being made smaller after a part went away is logged, where it was an unhandled rejection.
  • A project in a folder with a space or & in its name exports its compiled scripts on Windows. The compiler that turns scripts into WebAssembly is a batch file on Windows and was started through a shell with its arguments unquoted, so a project under C:\My Games stopped at that step with a path cut in two. Setting up the bundled Emscripten and building the engine from a checkout in such a folder failed the same way and are fixed with it.
  • A multiplayer preview opens a Game tab for every client. The Game P2..N tabs were opened before the session had created its clients, so the list was empty and every client ran with no view to see or drive it; they now open once the client realms exist.
  • A terrain's heightmap and splatmaps, and a foliage field's density and scale maps, are read from their files and never uploaded. They are read on the CPU as numbers, yet the scene also loaded each as a texture: a 4097 heightmap held 64 MiB of video memory for nothing, and on a busy machine its upload missed the load deadline and the terrain came up as noise. These fields now hold the image's project path at run time (they are image fields, where they were texture), no texture is made of them, and the inspector picks them as before. A terrain or foliage field is grown again when one of its images changes on disk or in an update. A script that read Terrain.heightmap, splatmap, splatmap2 or Foliage.densityMap, scaleMap as a handle now reads a path.
  • Bitmap text with a broken byte is drawn at the width it is measured at. A BitmapText, a label atlas and measureText each read UTF-8 with a copy of their own, and the copies disagreed about a byte that is not UTF-8: one measured a replacement character, another laid out the raw byte, so a string cut in the middle of a character was aligned by a width it was not drawn at. They share one reader now. A stray or cut-off byte is U+FFFD and costs one byte, so the character after it is kept, and an overlong form or a surrogate is U+FFFD too.
  • A development build's line to the editor refuses a message it cannot hold. A native development build read whatever length a WebSocket frame claimed and allocated it, and kept adding fragments to a message without end. A message past 64 MiB, whole or in fragments, now closes the connection with code 1009 before any of it is allocated, and a control frame that is fragmented or longer than 125 bytes closes it with 1002. A close asked for while the connection was still being made was dropped and the connection opened anyway; it now closes with 1006 and never opens.
  • On Windows a packaged game keeps every save, not only its first. The desktop host writes a save to a temporary file and moves it over the old one, and on Windows that move was refused whenever a save already existed: a game's first save landed and every later one was dropped, with nothing said, so the next launch opened on the first. The host now replaces the file, and reads and writes its save paths as UTF-8 so a profile folder with non-ASCII characters is reachable. When a host does refuse a write, the SDK logs it once instead of carrying on as if it had landed.
  • Dusk is not black under a sky that lights the scene. With Light the Scene on, the sky a TimeOfDay moves is itself the light of every Ambient light that names no environment, and it grows dark as the sun goes down. The clock then scaled and tinted that Ambient light by the hour as well, to 0.17 of its strength just after sunset and 0.14 at night, so the darkness was counted twice: at dusk the ground and everything on it went black while the sky above was still bright. An Ambient light the sky lights is now left as it was authored. One with a colour or an environment of its own, which holds no hour, is scaled by the clock as before.
  • A HUD keeps its colours in a linear project. The screen overlay is drawn after the frame's output transform, and it wrote linear colour there: in a project whose rendering.colorSpace is linear, every picture, tint and text under a Canvas came out one gamma darker and more saturated than it was authored (a mid-grey of 128 was shown as 55, an amber as orange-red), while white and black looked right. The overlay now encodes what it writes, on WebGL2 and WebGPU, and a UI looks the same in both colour spaces. A UI visual with a material whose shader is its own is not changed by this.