Skip to content

jengine-blob

Soft bodies that split and join: Quiver Pond.

KindProject package: linked into the builds of the projects that list it
Sourcepackages/jengine-blob
Version0.1.0
Entry pointjengine_blob::BlobPackage
Script namespaceBlob
Listed byprojects/arcade-classics

List it in the top-level "packages" array of project.jengine:

{
"packages": [
{ "name": "jengine-blob", "source": { "type": "path", "path": "../../packages/jengine-blob" } }
]
}

Then rebuild the editor viewport for the project (jengine viewport-build projects/<name>, or the editor’s Rebuild viewport banner). Native and web builds link it on their own.

A scene that uses its components must be a v2 scene ("version": 2): a v1 scene has no field for a package component and keeps it as inert custom data.

A script can check that the package is linked with if Blob == nil then return end.

Scene keyRust type
bl_pondPondpackage only: needs a v2 scene

Commands run in every runtime and return nothing; a package publishes what scripts read onto components (see the notes below). The flat name also works.

CallFlat name
Blob.start(e, level)blob_start
Blob.stop(e)blob_stop
Blob.pause(e, paused)blob_pause
Blob.control(e, move, join, jump, split, next)blob_control
Blob.select_at(e, x, y)blob_select_at
  • projects/arcade-classics/assets/scenes/quiver.scene

From packages/jengine-blob/src/lib.rs.

Soft bodies that split and join - Quiver Pond.

A blob of pond jelly rolls, squashes, splits in two to fit through a crack or to hold a plate down while the rest of it goes on, and pulls itself back together. sim is the physics - rings of points under position-based dynamics, with a skin, a pressure and a little slack - and it is the package’s own, not rapier’s: a blob is twenty-four points that have to agree about one area, which is a constraint rapier has no word for, and a split or a join replaces bodies mid-step, which the package can do in one line and a physics world cannot do at all. level is the levels, as ASCII; draw draws them, each blob as a pair of Mesh2Ds written from its skin every frame.

CallDoes
Blob.start(e, level) / Blob.stop(e) / Blob.pause(e, paused)play a level (from 0)
Blob.control(e, move, join, jump, split, next)this frame’s input: move -1..1 and join held, the rest once
Blob.select_at(e, x, y)take hold of the blob at a world point (a tap)

bl_pond: active, level, levels, level_name, hint, need, volume (every drop still in play), blobs, selected_volume, beads_left, won, lost, time, and events - split, join, cant_split, jump, land, bead, plate (down), gate (open), pop, select, won, lost.