Your first cart

Five minutes from zero to a running sprite. No install — the studio is a web page; carts compile and execute in your browser.

  1. Open the studio. Click Studio in the nav, or use the button below to load the sprites tutorial cart directly.
  2. Browse the tabs. Code (Forth source), Sprites (8×8 tile editor), Sounds (tracker), Cart (metadata + bytes inspector).
  3. Edit and compile. Make a change in the Code tab and click Compile. Errors land in the console drawer at the bottom.
  4. Run. Hit Run — the preview panel runs your cart at 60 Hz. Stop silences audio and halts the loop.

Try it

( tut-sprites: draw sprite 0 at center, move with arrows )
variable x  64 x !
variable y  64 y !
: update
  0 cls
  2 btn if x @ 1 - x ! then  ( left  )
  3 btn if x @ 1 + x ! then  ( right )
  0 btn if y @ 1 - y ! then  ( up    )
  1 btn if y @ 1 + y ! then  ( down  )
  0 x @ y @ 0 sprite ;   ( tile=0  x  y  flags=0 )

Next: read the Forth reference to see the full word set, or jump to one of the tutorials.