This repository contains faithful C ports of the official 32Blit SDK examples. They serve to demonstrate how to use the C engine API for graphics, audio, input, and more.
| Example | Status | Description |
|---|---|---|
| doom-fire | Complete | Procedural fire effect |
| rotozoom | Complete | Per-pixel rotozoom |
| audio-test | Complete | 5-track sequencer and visualization |
| timer-test | Complete | Timer callback demo |
| tween-test | Complete | Bouncing circle with color tween |
| tween-demo | Complete | Multiple tween types demo |
| piano | Complete | Piano keyboard with button input |
| particle | Complete | Particle system demo (Smoke, Spark, Rain) |
| tilt | Complete | Accelerometer "sand" demo |
| waveform-demo | Complete | Visualizes and plays audio waveforms |
| logo | Complete | 3D rotating particle logo |
| fizzlefade | Complete | Screen fade effect |
| audio-wave | Complete | Audio buffer callback demo (breaking glass) |
| matrix-test | Complete | Matrix 3x3 transformation demo |
| metadata-test | Complete | Metadata reading test |
| saves | Complete | Persistent SD card storage demo |
| sprite-test | Complete | Sprite sheet rendering demo |
| text | Complete | Custom TTF font and alignment demo |
| palette-cycle | Complete | Dynamic palette manipulation (torch animation) |
| palette-swap | Complete | Multiple palette switching demo |
| tilemap-test | Complete | Advanced tilemaps with scanline effects |
| geometry | Complete | Full Asteroids-style game with polygon splitting |
| platformer | Complete | Full platformer with dynamic lighting and physics |
| shmup | Complete | Side-scrolling space shooter demo |
| flight | Complete | Mode7 pseudo-3D flight simulator |
| raycaster | Complete | Wolfenstein-style 3D engine with sprites |
| voxel | Complete | Comanche-style voxel terrain renderer |
| tunnel | Complete | Classic demoscene tunnel effect |
These examples must be compiled using the arm-none-eabi-gcc toolchain, pointing to the custom CMake toolchain file provided by the My32Blit_C SDK.
The easiest way to build all examples on Windows is to run the batch script at the root of the examples directory:
.\build_all.batThis script will configure, build, and package all 32 games sequentially, outputting success/failure logs at the end.
If you only want to build a single game (e.g. logo):
- Open a terminal in the specific example's directory (e.g.
logo/). - Create and enter a build folder:
mkdir build cd build
- Configure CMake using Ninja and the firmware's toolchain file:
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../../My32Blit_C/cmake/toolchains/gcc-arm-none-eabi.cmake
- Build the
.blitfiles:ninja
Once the build is complete, you can use the provided Python helper script to automatically copy the compiled games to your SD card.
- Connect your 32Blit to your computer in USB Mass Storage (MSC) mode, or insert your MicroSD card into an adapter.
- Open a terminal in the
My32Blit_C_Examplesfolder. - Run the helper script:
python copy_to_sd.py
- Enter the drive letter of your SD card when prompted (e.g.,
E,F,D).
The script will automatically scan the project directories for all generated .blit files and place them in the /games/ folder on your SD card.