Crash-tan Crash-tan

2.3.0 Released and Prepping For Build Server!

Crash BASIC 2.3.0 Release Notes

written by Crash-tan

The web IDE is getting ready to build for everything! Windows, macOS, Linux,
iPhone and iPad, Apple TV, Android and the web, all from a browser tab,
signed with your own certificates if you have them. This release stages it,
and building from the web opens up in a future one.

BUILDING FROM THE WEB IDE

Coming soon: this release gets everything ready for building from the
web IDE, but the build server itself isn't open yet. You'll be able to use
it in a future release; until then, build from the desktop IDE.

A browser can't compile a game for a computer or a phone itself, so the web
IDE hands that part to a build server. Project ▸ Build... opens a window
that looks just like the desktop IDE's: tick the platforms you want, give it
the build server's address, and press Build.

  • Your game goes to the server sealed, the way every build is, with the
    secret that opens it and the options from Project info. You need to be
    signed in to the Crash BASIC Arcade, and the server takes that sign-in.
  • The window shows the server's progress as it goes, and when it's done each
    platform has its own download: a zip for most, and a .tar.gz for Linux.
  • iOS, tvOS and Android come back as Xcode and Android Studio projects, the
    same as from the desktop, for you to sign and send to the stores.
  • The server keeps nothing. Your game, its secret and your signing details
    are thrown away when the build is done, and the files it made go soon
    after, so download them straight away.

"Export for the web (itch.io)..." is still there too, and still made right in
the tab.

SIGNING YOUR BUILDS

Tick the boxes under Signing and the server signs your builds as you:

  • macOS: your Developer ID Application certificate (.p12) and its
    password, and an App Store Connect API key (.p8, its key id and its issuer
    id). The app comes back signed and notarized, so it opens on any Mac without
    a warning. The key has to be a Team key with the Developer role, on the same
    team as the certificate.
  • Windows: your Azure Artifact Signing account (its endpoint, account,
    certificate profile, and the tenant id, client id and client secret it signs
    in with). Every .exe and .dll comes back signed.

Leave them unticked and you get the same builds, unsigned.

Keep in this browser saves your signing details for next time, encrypted,
in the browser's own database. Give them a passphrase as well and they only
open when you type it: that's the one to use if anyone else could ever get a
copy of your browser's files. Forget your passphrase and they can't be opened,
by anyone, so you'd enter them again. Forget removes them.

BUILDING ON THE DESKTOP

  • A Mac app built on Windows or Linux can now be signed there (with
    rcodesign, say). Its program used to have no room left in it for the
    signature.
  • Building for Linux from a Linux computer with an ARM processor works. It
    used to try to make the Linux player with that computer's own compiler,
    which can't make one for the Intel and AMD processors the player is for.
  • Builds work with CARGO_TARGET_DIR set. The game's player used to be made
    in that folder, and then the build couldn't find it.

SMOOTHER MOTION

Your game ticks 60 times a second, but your screen might refresh 100 or 144
times a second, and before now each tick's picture just sat there until the
next one, for one refresh or for two, unevenly. That's the judder you could
see in a scrolling level. Now I draw what each tick moves between ticks,
so motion is smooth on any screen, and a tick that runs late on a busy
computer doesn't show as a jump.

  • Sprites glide, and so do their fades, sizes, turns and heights, polygon
    shapes, and the scroll of every layer.
  • A sprite you place (with LOCATION, a pattern step, or your own code)
    goes straight there, and so does one that moves more than a quarter of the
    screen in one tick. Only motion is smoothed.
  • Your game's own moves and the engine's are on one timeline, so a camera
    your main loop moves stays with the sprites the engine moves.
  • The game's threads tell the computer they're drawing frames, so it keeps
    them going when it's busy with something else.

MULTIPLAYER

  • Sprites from a CrashNet server move smoothly on every player's screen.
    They used to step 20 times a second (the server's tick rate) while the
    player's own sprites moved 60 times a second, and a sprite the server
    started moving could jump. Now the server's sprites and yours play on one
    timeline, so a camera that follows a server's sprite stays with it.
  • BEGIN MEMORYBUFFER in code a player's server runs gets its picture's size
    back, as it does on the host. It used to get the wrong answer.

FASTER

  • Songs render up to twice as fast with LOADMUSIC on a computer or phone
    with a few cores to spare: each channel renders on its own, all at once.
    And a song with effects now renders exactly the same every time. It
    could come out a little different from one render to the next before.
  • Busy games do a lot less work every tick. A scene full of colliding sprites
    makes about a twentieth of the memory requests it did, so it runs steadier.

THE SPRITE EDITOR

The IDE's sprite editor does everything the old web IDE's did now, and then
some:

  • The timeline is a grid: a row for each layer, a column for each frame,
    and each cel's picture where they meet. Drag frames, layers and tags to
    move them (drag a tag's end to make it longer or shorter), right-click any
    of them for more, and use a layer's ⚙ for its opacity and blend.
  • Import Sprite Sheet opens for a PNG with no .ase yet: set the frame
    size, the lead and the buffer, see the cut over the picture, and import
    every frame or just the ones you click.
  • Pick from Spritesheet takes one frame-sized piece of any picture (from
    the project or your computer): drag the box where you want it, then
    Add Frame.
  • Resize tells you whether scaling loses anything. Besides scaling or
    keeping the art as it is, Start empty cuts the sheet you imported again
    at the new size.
  • Save As (⌘⇧S) saves the sprite as another file and keeps editing that
    one. Export saves a copy outside the project, as a PNG or an .ase.
  • The preview has Play, Pause and Stop, a From and To, and Loop.
    Picking a tag with its own speed puts that speed on the slider. When frames
    have their own times, letting go of the speed slider asks before it
    overrides them.
  • Tools: Outline Silhouette wraps everything you've drawn in an outline on
    a layer of its own, and ⌘J (⇧⌘J to cut) puts what you've selected on a new
    layer. You can hide the tool palette, and the blob tool has Commit and
    Discard buttons. Every tool's tooltip says what it does.
  • Slices resize from any corner, rename with a double-click, and have
    their key, Copy BBOX and delete buttons right on the canvas. Tick Always
    show
    to see them with any tool.
  • Templates show as cards with their pictures, and copying a frame with
    nothing selected and pasting it makes a new frame.
  • The reference picture can come from your computer, as PNG, JPEG or WebP.

THE TILE EDITOR

  • Import... cuts a picture from your computer (PNG, JPEG or WebP) into
    tiles of your set's size, and shows how many are left when tiles that look
    alike are merged before you choose.
  • Save As and Export, as in the sprite editor.
  • Animations: see where a tile is in its animation, play it right on the
    canvas, set its speed, duplicate a frame, choose which tile is the base,
    and clear its frames. Taking a frame out asks first.
  • Drag tiles onto auto-tile slots and onto the organizer's grid. The tile
    list in both scrolls, so a set of thousands of tiles still fits.
  • A tile or frame you copy pastes in as a new tile.

PALETTES

  • No colour limit. Extract every colour from a photo if you like: the
    swatches wrap to the panel and scroll.
  • Extract takes colours from this frame or tile, all of them, the
    reference picture, a picture in the project or one on your computer, and
    replaces your palette or adds to it.
  • Reduce shows which colours will merge into which before it does
    anything, and can repaint your art to match.
  • Ramp works from any base colour (pick it or type its hex) and says how
    many of its colours are new. Reset shows each preset's colours.
  • Drag swatches to put them in order.
  • Each project remembers its sprite editor's and tile editor's palette,
    backdrop colour and tool palette.

THE IDE

  • Search (⌘⇧F) finds text in every file of your project, open ones
    included, unsaved changes and all.
  • Duplicate in a file's right-click menu.
  • The scroll buttons in the sprite and tile editors are a d-pad now.
  • In the scene editor, a boundary's tag shows once you're zoomed in far
    enough to read it, instead of covering everything when you zoom out.
  • The grid is on to start with, in both editors.

THE WEB IDE KEEPS YOUR THINGS SAFE

The web IDE doesn't keep anything in the browser's localStorage any more,
where other pages of the same site could read it:

  • Your settings and your list of projects are in the browser's own database.
  • Your GitHub and Arcade sign-ins are encrypted there, with a key the browser
    won't hand to anything, including the IDE itself.
  • Opening a project in a second tab still warns you, and a closed or crashed
    tab never leaves the project stuck as "already open".

Everything moves over by itself the first time you open the new IDE.

FIXES

  • PAUSE notices a quick tap. It used to look for a key being held down
    every so often, so a press and release that both came between two looks was
    missed, and you could tap a key over and over before one counted.
  • In the web IDE, a game starts with no keys held. A key still down when the
    last run ended (the one that quit it, say) used to stay held into the next
    run, so PAUSE answered only that key and KEYDOWN saw it pressed.
  • Deleting a sprite's last frame in the sprite editor no longer crashes the
    IDE.
  • In the scene editor, a boundary inside an enclosure can be clicked and
    dragged. The enclosure used to take every click inside it; now it takes
    clicks on its edge.