Crash-tan Crash-tan

Crash BASIC — Release Summary, 1.42.0 → 1.44.0

Headline features

Type-bound methods — types that do things (1.44.0)

The marquee addition. A TYPE is no longer just a bag of fields — it can carry
methods, and a method knows the instance it was called on through a new
implied reference, SELF. No classes, no inheritance, no ceremony.

TYPE Player
    health AS INTEGER
END TYPE

SUB Player::TakeDamage(amount)
    SELF.health = SELF.health - amount
END SUB

FUNCTION Player::IsDead()
    IsDead = SELF.health <= 0
END FUNCTION

DIM p AS Player
p.health = 100
CALL p.TakeDamage(30)
IF p.IsDead() THEN PRINT "game over"

A method is an ordinary sub/function plus SELF — so every call form works:
CALL p.Method(), x = p.Method(), methods on array elements
(CALL enemies(i).Hit()), methods as THREAD/TIMER/RENDER/EVENT
callbacks, and methods called on SELF from inside another method. DIM x AS Player now creates a real, pre-populated, type-tagged instance. And in
multiplayer, a typed object keeps its type across the network, so its methods
resolve on the receiving machine without shipping any code — every player runs
the same program.

Self-animating polygons — Polygons Come Alive (1.43.0)

SET POLYGON binds a polygon's vertices to a MUTATION. Put a behavior on the
mutation and the shape animates itself on the GPU, every frame, above its
layer like a sprite — no per-frame redraw. Fill it, texture it, animate the
texture with a second mutation, or run a sprite shader on it. Concave shapes
(stars, arrows, crescents) now fill correctly via ear-clipping, and mutation
coordinates went floating-point so motion is smooth instead of stepping.

Build for every desktop, from any desktop (1.42.0)

Package a game for Windows, macOS, and Linux from a single computer,
whatever you're running — one machine, all three desktops. The first time you
target a platform whose build tools aren't installed, the packager offers to
fetch them. Audio and video libraries are now built in, so a packaged game is a
tidier, more self-contained bundle.

FM synthesis grows up — FM Finds Its Grit (1.42.2)

Custom instruments gained the two things the FM chips of 16-bit consoles were
famous for: operator feedback (the warp from clean sine toward a gritty
sawtooth) and FM envelopes (the timbre moving over a note — the classic
electric-piano "ping," a swelling brass note, a decaying bell). Modulators can
now stack, too, for the more aggressive voices a single modulator can't reach.

JMES() — query your data in one line (1.42.0)

JMES(data, "query") runs a JMESPath query over
JSON-shaped data and hands back a normal Crash value — reach a nested field,
run a function over an array, filter and take the first match, without
hand-walking a tree.


Notable fixes & refinements

Graphics & collision

  • Uniform collision geometry (1.44.0). The automatic FOR … COLLISION
    loop now uses each sprite's bounding box and scale, matching the explicit
    collision checks — every collision test point shares one definition.
  • Aseprite per-cel Z-Index honored (1.42.6). The direct .aseprite loader
    now composites cels in the same front/back order the editor shows, frame for
    frame.
  • SET SPRITE n FRAME f (1.42.0) — change a sprite's frame on its own,
    without re-stating position and image.

Audio & music

  • Instrument Volume actually works (1.42.3). The slider had been silently
    discarded on every keypress; it now holds, layered correctly on top of note
    velocity.
  • No ceiling on custom instruments (1.42.4). Instruments numbered above 66
    in a custom .cbi pack are reachable from music instead of snapping back to
    I66.
  • Loops land on the downbeat (1.42.5). Song loops are measured against the
    whole pattern (drums included) and snapped to whole bars by time signature —
    no more frantic double-time first bar.

Text, platform & runtime

  • TEXTTOIMAGE matches PRINT spacing (1.42.1). Baked text now lines up
    exactly with printed text (fractional advances carried, rounded only at draw).
  • Signed macOS builds notarize (1.42.1). Inner pieces are signed in the
    correct order with the hardened runtime, so downloaded copies open cleanly.
  • IMPORT anywhere in the browser (1.42.7). The WASM runtime now expands
    IMPORT on any line, matching native.
  • ANIMATE with no frame list animates (1.43.1). The "use all frames"
    shorthand now cycles the whole sheet instead of freezing on one frame.
  • Reliable packaged-game launch (1.42.0) regardless of how the build is
    started; friendlier iOS cloud-save messages.

Multiplayer correctness

  • SET POLYGON is client-only (1.43.1). Bound polygons render per-client,
    so a server-side SET POLYGON in a CrashNet game is now a clear error.

Version-by-version

Version Summary
1.42.0 Ship It Everywhere — cross-platform desktop builds from any desktop (auto-fetch toolchains), built-in audio/video libraries, JMES() JSON queries, SET SPRITE n FRAME. Reliable packaged-game launch; friendlier iOS cloud-save messages.
1.42.1 TEXTTOIMAGE spacing now matches PRINT; signed macOS game builds pass notarization.
1.42.2 FM Finds Its Grit — operator feedback, FM envelopes, and modulator stacking for custom instruments.
1.42.3 Instrument Volume control works (was discarded on each note).
1.42.4 Custom instruments numbered above 66 are reachable from music (removed a legacy I66 cap).
1.42.5 Song loops measured against the whole pattern and snapped to whole bars — loops land on the downbeat.
1.42.6 Aseprite per-cel Z-Index honored by the direct file loader, matching the editor.
1.42.7 IMPORT anywhere in the file now works in the browser (WASM) runtime.
1.43.0 Polygons Come AliveSET POLYGON (mutation-bound, fill/texture/animated-UV/shader), concave fills via ear-clipping, floating-point mutations.
1.43.1 ANIMATE with no frame list cycles all frames; SET POLYGON is client-only in multiplayer.
1.44.0 Types That Do Things — type-bound methods (SUB/FUNCTION Type::Method, SELF), real typed instances via DIM, typed objects replicate across CrashNet with methods intact, and uniform bounding-box/scale collision. Rolls in the 1.43.1 fixes.

Compatibility, in one line

Every release in this span is additive or a correctness fix. The only
behavior changes worth a regression glance: mutations are now floating-point
(1.43.0); DIM x AS UndeclaredType is now a loud error rather than a silent
untyped object (1.44.0); and the FOR … COLLISION loop now respects a sprite's
BBOX/scale (1.44.0). Nothing else alters the shape of code you've already
written.