Crash-tan
A new face with a single codebase (2.1.0)
Crash BASIC 2.1.0 Release Notes
written by Crash-tan
A big one for the IDE! The IDE in CrashPlayer now has editors for songs,
instruments, sprites, tiles and maps, Source Control, and sign-in to the
Arcade. It also keeps everything your game needs to know about itself, packs
it into a .crashcart and builds it for every platform.
And it's the same IDE in your browser now: the one in CrashPlayer, built for
the web, with your projects right where you left them.
A PROJECT MENU
There's a Project menu in the IDE's toolbar now, next to Save:
- Project info… — what your game is called and how it runs
- Export .crashcart… — the whole project in one file
- Import .crashcart… — a cart back into a project
- Build… — the game, made for the platforms you pick
YOUR GAME'S INFO
Project info… opens a form with:
| Field | What it's for |
|---|---|
| Game name | what players see |
| Game id | your game's own name for me: lower case letters, digits and -. New makes one from the game's name |
| Version | like 1.0.0, or 1.0.0-beta |
| Author, Author email, Author URL | who made it |
| Description | a line or two about it |
| Orientation | Landscape, Portrait or All (auto-rotate), for phones and tablets |
| Window size | like 1280x720, the size the window opens at |
| Start fullscreen | opens filling the screen |
| Bundle id | like com.studio.mygame, for iOS and Android |
| Game secret | Generate makes one: a cart made with it opens only in a build made with it. Left empty, each build makes its own |
Save checks each field the way the web IDE does, tells you which ones
aren't right yet, and when they all are, writes them to .crashbasic.json in
your project folder. That's the
same file the web IDE and the VS Code extension keep, with the same names in
it, so a project carries its info between all three. Anything in the file I
don't know about stays there when I save.
CARTS IN AND OUT
Export .crashcart… packs every file in the project into one .crashcart,
with the project's info inside it. Hidden files (the ones whose names start
with .) stay behind, and an empty folder still arrives empty. The cart is
signed with your own author key, which I make the first time you export and
keep in CrashPlayer's settings folder, so every cart you make is signed the
same way.
Import .crashcart… asks where the cart should go:
- Into a new folder… — pick an empty folder (or make one), and the cart
opens there as a project - Replace this project… — the project's files are deleted and the cart's
put in their place, after you say yes once more. Hidden files stay, and so
do the window size, fullscreen and bundle id, which a cart doesn't carry
If the cart was made with a game secret, I ask for the secret before opening
it. Either way, the project's info comes back with it, author email and URL
and orientation included.
BUILD FROM THE IDE
Build… makes the game for Windows, macOS, Linux,
iOS + tvOS, Android and the Web, from the project you have open.
It uses the project's info, so the name, icon (icon.png in the project
folder), orientation, bundle id, window size and game secret all go in without
being typed again. It builds into your Downloads folder unless you pick
another, takes a signing identity for macOS, and shows what it's doing as it
goes. When it's done, Show in folder takes you to what it made.
Every build is sealed: the cart inside it opens only in the players built
with it. The project's game secret seals it, or, if it hasn't got one, a new
secret I make for that build alone. That's why Windows, macOS and Linux builds
need Rust installed: I compile each game its own player,
with its secret built in. The phone builds carry the secret in their app's
code, and a web build carries it in its page, where anyone can read it. On the
web a secret ties the cart to its build and hides nothing.
AND FROM THE COMMAND LINE
crashplayer cart packs a project folder into a cart, the same way Export
.crashcart… does:
crashplayer cart "Rocket Run"
crashplayer cart "Rocket Run" -o cartsWithout -o the cart is <game-id>.crashcart in the folder you're in; -o
takes a file name or a folder. A project without a .crashbasic.json still
packs: I take its name and id from the folder's name, and tell you I did.
And crashplayer package takes a project folder now, as well as a cart:
crashplayer package "Rocket Run" -p web -o buildI pack the folder into a cart on the way, sealed as the IDE's builds are, and
anything you don't give on the command line (the name, icon, orientation,
bundle id, window size, fullscreen and game secret) comes from the project's
info.
THE IDE IN YOUR BROWSER
The web IDE is CrashPlayer's IDE now, running in the page, and it keeps
projects where the old one did, so yours open just as they were. It runs your
game in the page, debugger and all, plays its sound through the same engine,
and keeps the toolbar's project menu: open, make, rename and delete projects.
Each project opens in one tab at a time; open it in a second and I offer you
another project, a new one, or Force open.
The browser has some things of its own:
- Your game's saves stay apart. When a running game writes a file, it
goes into the game's saves, not your project. When the run ends I ask about
each file: Accept it into the project, Keep temporary (the game
keeps reading it, but it isn't part of your project), or Discard it.
Kept saves are listed under your files, where you can accept or discard
them later. - A local folder. Keep a project in step with a folder on your computer:
connect, sync, pull, push everything, or push each change as you make it. - Export for the web (itch.io)… sits in the Project menu where Build…
is on the desktop, and makes a zip of your game ready to upload. - The game's preview can be resized from its bottom-left corner, and goes
away when the game ends.
A FRESH START
A new, empty project asks what your game is written in (Crash BASIC 2,
Crash BASIC, Python, Lua or JavaScript) and makes its main file for you. A new
code file starts as a tiny program in its language that opens a screen, prints
a line and waits for a key, so it runs straight away.
SONGS AND INSTRUMENTS
The song editor and instrument editor are in the IDE now, everything the web
IDE's had:
- Songs (
.cbm): songs, patterns and the arrangement, a piano roll, a
drum grid and the MML, with bends, note volumes, block select across
tracks, recordings in patterns, and key and scale highlighting - Write with help: a chord helper, a chord builder, an arpeggiator, a drum
generator with 28 grooves and 15 fills, a melody generator, and
Fix my melody, which finds the notes that are out of key, off the beat
or awkward and nudges each one right. You hear the fix before you take it - MIDI in: play and record from a keyboard, with drum pads bound to
tracks and your controller's play, stop and record buttons working too - In and out: import a MIDI file or a
.cbm; export a song as.cbm,
WAV or MP3 - Instruments (
.cbi): loop points, wavetables, a keyboard to play them
on, export and import of a single instrument, and hover help on every
control
PICTURES: SPRITES AND TILES
A .png or .ase opens as a preview, and a click turns it into the
Sprite Editor or the Tile Editor. They share the same painting:
layers with Aseprite's blend modes, and the pencil, shapes, fill, selection,
move, rotate, text, symmetry, palettes and ramps. On top of those come Fire,
Arc, Strand, Spray and Blob, a lump of clay you sculpt with light and shading.
Everything saves as Aseprite, so what you paint is what LOADIMG shows.
- Sprite Editor: frames on a timeline, tags with their direction and
rate, onion skin, slices (copied asBBOX(...)forSET SPRITE), walk-cycle
templates, and Generate Behaviors, which writes aBEHAVIORfor each
tag - Tile Editor: add, move and delete tiles (every number pointing at them
follows along), tile animations, auto-tile sets for each terrain (with cliff
faces and slopes), and an organizer to paint a block of tiles as one picture
New picture… in the file list makes a clear .ase or .png, and PNGs
picked together become one Aseprite animation, a frame each.
MAPS
A .map.json opens in the Map Editor, painted from its tileset: paint,
erase, fill, replace, lines and rectangles, selection, lift and lower, metadata,
stamps and auto-tiling. Alt-click picks up the tile under the pointer. It
also draws boundaries (with Copy BASIC for their BOUNDARY ADD lines, or
generated from the tiles), makes mazes and caves, and shows a screen-sized
frame you can drag about the map. Grow or shrink the map from + and −
on each edge.
A .atlas.json lays your maps out as cards, linked side to side. Rename a
map and its boundaries and every atlas follow.
SOURCE CONTROL
A Source Control tab beside your files: status, diffs, staging, commits,
branches, history, push, pull and fetch. On the desktop it uses the git you
have installed; in the browser it talks to GitHub.
CRASH BASIC ARCADE
Crash BASIC Arcade… in the Project menu signs you in to the Arcade, with
Discord or email. No password passes through the IDE. While you're signed in:
- your games are listed, and any of them opens back into the IDE
- the project uploads as a new game, or over one of yours
- Export .crashcart, Export for the web and builds stamp the cart
first. If a stamp fails I stop and tell you why; nothing goes out unstamped
without your knowing
FILES AND EDITING
- The file list: an icon for each kind of file, small pictures of PNGs and
.ases (their frames playing), select several and drag them into a folder
or delete them together, and drop files and folders in from your computer.
Its menu makes code in any language, maps, atlases, songs and instrument
banks - Previews: JSON and Markdown are coloured, and a
.wavor.mp3shows
its waveform and plays from wherever you click - Themes: Monaco Dark, Crash-tan, Dr. Brane, Victor Hardline and One Dark,
from the right end of the toolbar - When your game stops on an error, my error dialog opens and the editor
goes to the line - Help: a Help button for the open file's language, with every section
of the reference, and F1 on a word opens its whole entry. Next to it,
Interactive Reference Guide opens the book - Release notes: click the version at the far right of the toolbar to read
these - Push's tooltip says what pushing does for each language that pushes,
Crash BASIC 2 and JavaScript included - Open IDE, top right in CrashPlayer's launcher, opens the IDE in its own
window
CARTS KEEP THEIR SAVES
A .crashcart game on the desktop now keeps the files it saves. They live insaves/<game id> in CrashPlayer's settings folder, and the game reads them
back next time. Before, they were lost when the game closed. A game run from
a folder saves into its folder, as before.
And a game only reads files inside its own folder: an IMPORT of a file above
it is refused now, as every other read already was.
SOUND
Wavetable instruments don't alias any more. High notes played harmonics too
high to play, which folded back down as a buzz. And on devices that don't
run at 44.1 kHz (lots of Bluetooth headphones), I now convert the sound
properly, so the treble isn't dulled.