jengine-blob
Soft bodies that split and join: Quiver Pond.
| Kind | Project package: linked into the builds of the projects that list it |
| Source | packages/jengine-blob |
| Version | 0.1.0 |
| Entry point | jengine_blob::BlobPackage |
| Script namespace | Blob |
| Listed by | projects/arcade-classics |
Using it
Section titled “Using it”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.
Components
Section titled “Components”| Scene key | Rust type | |
|---|---|---|
bl_pond | Pond | package only: needs a v2 scene |
Script commands
Section titled “Script commands”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.
| Call | Flat 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 |
Scenes that use it
Section titled “Scenes that use it”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.
Script commands
Section titled “Script commands”| Call | Does |
|---|---|
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) |
What scripts read
Section titled “What scripts read”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.