Home | Steam | Itch.io | Documents | About
GameBuilder BASIC (GB BASIC) is a retro Fantasy Console that generates ROMs compatible with the popular handheld game console. It has everything ready-to-use for writting code, making assets, compiling projects, running with the built-in emulator, exporting to runnable ROM, etc.
This repository contains the full source code of GB BASIC, including the kernel (runtime virtual machine), the compiler (for BASIC), and all the editors.
GB BASIC is programmable in a brand new BASIC dialect. The integrated assets editors are intuitive to use. You can generate real ROMs and play on any GB emulator or hardware.
- Imperative paradigm
- Non-structured programming
- Concurrent processing approach
- Declarative paradigm
- Data driven approach
- Programmable in BASIC, an easy to learn and fun to use programming language
- Easy to use API for graphics, input, audio, and other facilities
- Built-in libraries for scene, actor, controllers, GUI
- Built-in libraries for collision detection, persistence, RTC, etc.
- Extension feature including mouse & touch, shell command, debugging, etc.
- Handy tools for editing tiles, map, scene, actor, font, sound, etc.
- Project can be exported into real ROM
- Dozens of example projects
- CPU: 4.19MHz/8.38MHz for classic/colored respectively
- Threads: up to 16 concurrent execution contexts
- Display: 160x144px
- Code: BASIC, supports multiple source pages
- Gamepad: 8 buttons (D-Pad + A/B + Select/Start)
- Mouse and touch: supported by extension
- Tiles: up to 256 units per page
- Map: up to 255 tiles in one dimension per page; two layers (graphics, attributes)
- Sprite: supports 8x8 and 8x16 sprites
- Scene: up to 255 tiles in one dimension per page; four layers (map, attributes, properties, actors)
- Actor: up to 8x8 tiles per frame; up to 1024 frames per page
- Font: supports TrueType (.ttf) and bitmap-based (.png .jpg .bmp .tga); up to 16px; 1bpp or 2bpp
- Audio: 4 channels; supports importing from JSON, VGM, WAV, FxHammer
- Palette: 2bit (4 colors) per tile, palette of map and actor is configurable for colored device
- GUI: supports label, progress bar, menu, etc.
- Persistence: supported
- RTC: supported
- Serial port: supported
A C++14 capable compiler is required, any compiler came after 2014 should be ok. You need to get this repository before build:
git clone https://github.com/paladin-t/gbb.git
cd gbb
Dependencies: Visual Studio (with C++ development tools installed).
Steps
- Build SDL2
- Compile from "lib/sdl/VisualC/SDL.sln"
- Execute
lib/sdl/copy_win.cmd
- Build GB BASIC
- Compile from "gbbasic.sln"
- Build GBBVM
- Execute
gbbvm.cmd
- Execute
Dependencies: CMake, GCC.
Steps
- Build SDL2
- Execute:
cd lib/sdl ./configure make sudo make install cd ../..
- Execute
lib/sdl/copy_linux.sh
- Execute:
- Build GB BASIC
- Execute:
cd gbbasic.linux cmake . && make cd ..
- Execute:
- Build GBBVM
- Execute
gbbvm.sh
- Execute
Dependencies: Xcode.
Steps
- Build SDL2
- Compile dylib from "lib/sdl/Xcode/SDL/SDL.xcodeproj"
- Reveal "libSDL2.dylib" in Finder
- Copy "libSDL2.dylib" to "lib/sdl/lib/mac/"
- Build GB BASIC
- Compile from "gbbasic.xcodeproj"
- Build GBBVM
- Execute
gbbvm.sh
- Execute
Details
You can also setup your own build pipeline for other platforms. The "lib" and "src" directories are almost what you need.
The "platform_*" files contain most platform dependent code, you'll probably make a specific port.