A collection of retro video games I want to make, developed using the Banjo API.
This project also serves as a playground to drive Banjo’s ongoing development and test its features across different targets.
Web builds are powered by the Emscripten WebAssembly framework.
Requirements:
- CMake >= 3.21
- Emscripten SDK
Create a folder for building the project, and change to that directory.
The rest of this guide will assume you are using a .build_web/ folder directly under the root of this project.
For example:
mkdir .build_web && cd .build_webFirst, make sure you installed and activated Emscripten:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd -Run CMake with Emscripten enabled and build the project:
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release -DBJ_FEATURE_EMSCRIPTEN=ON
cmake --build . -jWhen the build completes, index.html, the .js, and .wasm game files will be in your build directory.
Option 1 – emrun (recommended for Emscripten testing):
emrun is included with the Emscripten SDK and automatically sets the correct MIME types for .wasm and .js files.
From your build directory, run:
emrun --port 8000 index.htmlAdd --no_browser flag to avoid auto-opening of your default browser.
Then visit:
http://localhost:8000/index.html
Option 2 – Python HTTP server (simple, works without Emscripten active):
python3 -m http.server 8000Then open http://localhost:8000/index.html in your browser.
To build native Linux executables with ALSA and X11 enabled (always on for Linux builds):
Requirements:
- CMake >= 3.21
- GCC or Clang toolchain
- Development packages for ALSA and X11
From the project root:
mkdir .build_linux && cd .build_linux
cmake .. -DCMAKE_BUILD_TYPE=Release -DBJ_FEATURE_X11=ON -DBJ_FEATURE_ALSA=ON
cmake --build . -jThe compiled game binaries will be in the .build_linux/ folder.
To build native Windows executables with Win32 and MME enabled (always on for Windows builds):
Requirements:
- CMake >= 3.21
- Visual Studio (MSVC) or MinGW-w64 toolchain
Using Visual Studio (MSVC):
mkdir .build_win
cd .build_win
cmake .. -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DBJ_FEATURE_WIN32=ON -DBJ_FEATURE_MME=ON
cmake --build . --config ReleaseUsing MinGW-w64 (from MSYS2 shell):
mkdir .build_win && cd .build_win
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DBJ_FEATURE_WIN32=ON -DBJ_FEATURE_MME=ON
cmake --build . -jBinaries will be placed in the .build_win/ folder.
Each discovered game has a GAME_<name> CMake option (default: ON).
To disable building a specific game:
cmake .. -DGAME_pong=OFFOnly enabled games will be built and appear in the index.html game list for Web builds.