USB Target
The USB target puts your game on a bootable USB stick. Plug it into a PC, start the PC from the stick, and your game runs full screen with no operating system to install. When the player quits, the PC powers off. Nothing on the PC's own drives is used or changed.
This target is new. So far it has only been run on one real PC (NVIDIA graphics, UEFI start-up), so try your stick on the PC it's meant for before relying on it.
What You Need
- xorriso, QEMU and OVMF - scripts/deps-appdev.sh installs them. xorriso puts your game on the ISO, and QEMU and OVMF let Build and Run try it on this PC
- The USB system - A one-time download of about 500 MB. The IDE offers it the first time you build for this target, and it goes in BambooBasic's bin folder. The offer also links to the system's licences and source code. If you've built BambooBasic from source, make usb-template makes your own there instead (scripts/deps-toolchain.sh installs what that needs). The system only changes for things like driver and security updates, so you won't need to download it often
Building
Choose Target > USB (ISO), then:
- Build - Makes USBOutput/YourGame.iso in your program's folder
- Build and Run - Makes the ISO and starts it in a QEMU window on this PC. Build > Stop closes it, and so does quitting the game. Without hardware virtualisation it's very slow, and the Output tab says so
These go on the stick from your program's folder: the Media folder, LICENSE.txt, game.ini and any userlib .so files beside the program. Other files don't, so keep what your game loads in Media. The debugger isn't available on this target, and a UseConsole program can't go on a stick, because there's no terminal for it.
Writing the Stick
This wipes everything on the stick. In GNOME's Disks app, pick the stick, open its menu and choose Restore Disk Image. Or in a terminal, after checking which device is the stick with lsblk:
sudo dd if=YourGame.iso of=/dev/sdX bs=4M conv=fsync status=progress
What's on the Stick
- A small Linux system - Debian 13, with the drivers for graphics and sound. It starts your game and nothing else, with no desktop
- The BambooBasic runtime - The IDE adds the one built for the stick (userlibs/BBRuntimeDebian.so) to every ISO, so it's always your BambooBasic's version
- A game folder - Your program, with its media and game.ini
The system is about 500 MB, so a 1 GB stick has room for it and a small game. Each game is added to a ready-made system image, so the system isn't rebuilt for every game. The stick has no network drivers, so a game can't go online from it.
Starting From the Stick
Most PCs need telling once to start from USB, usually by pressing a key such as F12, F8 or Esc just after switching on. The key varies between makers. The BambooBasic logo shows while the system starts, then your game appears.
game.ini
This optional text file goes in your program's folder, with one setting on each line:
OnQuit=poweroff
Screen=SAMSUNG
SoundCard=1,3
- OnQuit - What happens when the game ends: poweroff (the default) or restart to run it again, which suits an arcade cabinet or a show stand
- Screen - The screen to use: its connector (DP-1, HDMI-A-1) or the name it reports (SAMSUNG, in any case). If no screen matches, the game uses the default one
- SoundCard - The sound output, as a card number and optionally a device number. This is rarely needed, and the numbers differ between PCs, so it only suits a game made for one known PC
- Name - The game's name. Nothing uses this yet
Screens
Every connected screen is switched on, and the game runs full screen on one of them. The others stay black. Without a Screen setting, the game uses the connected screen with the highest connector number, which you can't easily predict. If it matters, name the screen. A game that calls sysSetMonitor overrides this, but the sound still follows the screen chosen here, so it's better to use Screen on this target.
On a PC with two screens, the first logos can appear on a different screen from the game. The PC chooses that screen itself while it starts up. On a PC with one screen, everything appears on that screen.
Sound
Sound goes to one output, chosen once as the game starts, in this order:
- The SoundCard setting, if there is one
- Speakers or headphones plugged into the PC
- The screen the game is on, if it has speakers (HDMI or DisplayPort)
- Another screen with an HDMI or DisplayPort connection
- Any other sound output
Plug in headphones before starting the PC, as they aren't noticed afterwards. A screen can report that it has sound and still have no speakers, so on a two-screen PC the game may be silent until you name the screen that does have them, using Screen. A PC with no sound output at all runs the game silently.
Differences From the Desktop
- Files don't last - The game runs from memory, so anything it writes, such as high scores and settings, is lost at power-off
- Quitting matters - There's no desktop to go back to, so give the player a way to quit. Ending the game powers the PC off, unless OnQuit says otherwise
- One window - A game window smaller than the screen sits in the centre of it
What Hasn't Been Tried Yet
- AMD and Intel graphics
- Older PCs that start with a BIOS rather than UEFI (this has only run in a virtual machine, where the logo doesn't show during start-up)
- A real PC with only one screen
BambooBasic © 2026 Michael Denathorn