SatBASIC: a modern BASIC for making Sega Saturn 2D games

Hi all! I’d like to share SatBASIC, a structured BASIC for making 2D games on the Sega Saturn. You write your game in simple, readable BASIC, and SatBASIC turns it into a .bin/.cue CD image you can run in an emulator or burn to a CD-R.

SatBasic Github Page


The goal is to make Saturn development approachable: no C, no makefiles, no hunting through SDK docs. You just write your game.
TITLE "Hello Saturn"

ship = LOADSPRITE("ship.png")
x = 160

GAMELOOP

IF BUTTON(BTN_LEFT) THEN x -= 2
IF BUTTON(BTN_RIGHT) THEN x += 2
SPRITE ship, x, 120, FRAMES * 3 ' a spinning ship

END GAMELOOP

The language


  • Fully structured: multi-line IF / ELSEIF / ELSE, SELECT CASE, FOR / WHILE / DO / REPEAT, EXIT and CONTINUE.
  • SUBs and FUNCTIONs with typed parameters, local variables and recursion.
  • Records (TYPE), arrays, constants and INCLUDE.
  • A built-in 60 fps GAMELOOP, so there’s no boilerplate.
  • Variables get their type from the first value you give them.
  • Clear, beginner-friendly error messages with line numbers.

Saturn hardware made easy


  • VDP1 sprites: rotation, scaling (uniform or separate X/Y), flipping, half-transparency, shadow, mesh and draw layers, all in one line each.
  • VDP2 backgrounds: a scrolling, zooming picture layer and a rotation layer for “Mode 7” floors.
  • Parallax scrolling with any number of tile-map layers, including foreground layers drawn in front of your characters.
  • CD audio music, sound effects, both controller pads, collision helpers, and fast trig and maths.

Asset pipeline (converted automatically when you build)


  • PNG sprites, sprite sheets and tilesets, with transparency.
  • Tiled maps (.tmx/.json), including solid tiles, flipped tiles and object layers for placing enemies and items.
  • WAV music (turned into CD audio tracks) and sound effects.

Tools and docs


  • Runs on Ubuntu Linux and Windows. An installer sets up everything, including the Jo Engine SDK and an SH-2 toolchain.
  • One-command workflow: satbasic run mygame.sbas builds the game and opens it in an emulator.
  • VS Code extension: syntax highlighting, autocomplete (including your own SUBs, variables and TYPE fields), hover docs, parameter hints, errors shown as you save, and F5 to build and run.
  • Three PDF manuals:
    • a full Reference Manual with a cookbook of ready-made examples
    • a Beginner’s Guide for people who have never programmed, with every line of every example explained
    • a Ninja Action Game Tutorial that builds a complete one-level game step by step

Example games included


  • Coin Quest: a platformer with a Tiled level, enemies and music.
  • Star Catcher: a small arcade game.
  • Night Blade: a ninja action game with five-layer parallax, a somersault, shuriken, sword slashes, ninja magic, sprite rotation and scaling effects everywhere, and a boss fight.

All the art, music and code in the examples are original, so feel free to learn from them and build on them.

SatBasic Github Page


Status: testers wanted!
This is a fresh 1.0. The compiler, asset converters, CD image builder and all the example games are tested on PC. SatBASIC sits on top of Jo Engine, and the part that talks to the SDK is kept in one small, documented file.




Feedback, questions and feature requests are all welcome. Happy Saturn coding!
 
Last edited:
Back
Top