Docs / Installation
To start using GBDK.js you’ll need to have a few dependencies installed first.
GBDK, The GameBoy Developers Kit is a C library and compiler without which this project wouldn’t exist. You can use it to compile from C directly to a GameBoy ROM file to be played in an emulator or directly on device using a USB cartridge.
Once you have the release, unarchive it, move it to a permanent location
(such as /opt/gbdk) and add the bin folder to your
> unzip gbdk-mac.zip > mv gbdk /opt/gbdk > PATH=/opt/gbdk/bin:$PATH
If you want to keep gbdk in your path add it to your
Once GBDK is installed you should be able to run
lcc -V on a terminal to
confirm it is set up correctly.
> lcc -v lcc $Id: lcc.c,v 1.6 2001/10/28 18:38:13 michaelh Exp $
Follow the installation instructions for your system at
Once Emscripten is installed you should be able to run
emcc -v on a terminal
to confirm it is set up correctly.
> emcc -v emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.28
the GBDK library is distributed via npm so you’ll need Node.js installed also.
Get the latest release at https://nodejs.org and confirm installation using
> node -v v8.9.4
A GameBoy Emulator
To play your ROM files you’ll need an emulator such as OpenEmu. I find for during development that I prefer KiGB (Mac Version) as using
open romfile.gb on the
command line quickly reloads the application.
Once the above is installed you’ll be able to get the latest version of GBDK.js using npm.
> mkdir my-awesome-game > cd my-awesome-game > npm init > npm install gbdkjs
This will create a
node_modules/gbdkjs folder in your current path containing
If you’ve used Emscripten before this might be all you need but assuming you haven’t we suggest you now download an example project to get started.