32Blit asset preparation and upload tools
This toolset is intended for use with the 32Blit console to prepare assets and upload games.
The 32Blit toolset contains subcommands for each tool, you can list them with:
- image - Convert images/sprites for 32Blit
- font - Convert fonts for 32Blit
- map - Convert popular tilemap formats for 32Blit
- raw - Convert raw/binary or csv data for 32Blit
- pack - Pack a collection of assets for 32Blit
- cmake - Generate CMake configuration for the asset packer
- flash - Flash a binary or save games/files to 32Blit
- metadata - Tag a 32Blit .blit file with metadata
- relocs - Prepend relocations to a game binary
- version - Print the current 32blit version
To run a tool, append its name after the
32blit command, eg:
Build metadata, and add it to a
Flash and manage games on your 32Blit over USB serial.
Collate a list of addresses that need patched to make a
.blit file relocatable and position-independent.
Generate CMake files for metadata information and/or asset pipeline inputs/outputs.
You will typically create assets using the "asset pipeline", configured using an
assets.yml file which lists all the files you want to include, and how they should be named in code.
assets.yml file might look like:
# Define an output target for the asset builder # in this case we want a CSource (and implicitly also a header file) # type auto-detection will notice the ".cpp" and act accordingly assets.cpp: prefix: asset_ # Include assets/sprites.png # and place it in a variable named "asset_sprites" # Since it ends in ".png" the builder will run "sprites_packed" to convert our source file assets/sprites.png: name: sprites palette: assets/sprites.act strict: true # Fail if a colour does not exist in the palette transparent: 255,0,255 # Include assets/level.tmx # and place it in a variable named "asset_level_N_tmx" # Since it ends in ".tmx" the builder will run "map_tiled" to convert our source file assets/level*.tmx:
Converts a ttf file or image file into a 32Blit font.
- Image .png, .gif
- Font .ttf
All image assets are handled by Pillow so most image formats will work, be careful with lossy formats since they may add unwanted colours to your palette and leave you with oversized assets.
- 8bit PNG .png
- 24bit PNG .png
palette- Image or palette file (Adobe .act, Pro Motion NG .pal, GIMP .gpl) containing the asset colour palette
transparent- Transparent colour (if palette isn't an RGBA image), should be either hex (FFFFFF) or R,G,B (255,255,255)
packed- (Defaults to true) will pack the output asset into bits depending on the palette size. A 16-colour palette would use 4-bits-per-pixel.
strict- Only allow colours that are present in the palette image/file
- Tiled .tmx - https://www.mapeditor.org/ (extremely alpha!)
Raw Binaries/Text Formats
- CSV .csv
- Binary .bin, .raw
- Ensure the minimum required version of click is installed - thanks @LordEidi
- Add separate launch command (in SDK v0.1.11 and later) and
--launchflag to install - thanks @Daft-Freak
- Support 16bit tile indexes - thanks @ThePythonator
- Output URL/Category metadata for SDL builds - thanks @Daft-Freak
- Significant code refactor and fixes by @Ali1234
- Tools have been ported to Click
32blit installcommand that installs files/blits intelligently
- Significant code refactor and fixes by @Ali1234
- Metadata dump fixed to support RL images
- Bugfix to incorrect transparent colour being selected
- Configurable empty_tile for .tmx maps - specifies a tile ID for unset/empty tiles to be remapped to
- Optional struct output type for .tmx maps with width, height layer count and empty_tile
- .tmx map layers are now sorted
- Should not break compatibility, but use 0.4.x if you don't need the new features
- Breaks metadata compatibility with previous versions!
- Add URL field for GitHub URL
- Add Category field to categorise games/apps
- Add file associations field to identify supported filetypes
- Allow use of user-specified serial port if VID/PID are empty
- Support handling multiple sets of options in CMake tool
- Fixed "32blit game.blit" to save (to SD) instead of flash again
- New: RLE Encoding support for spritesheets
- Flasher: refined shorthands- "32blit flash game.blit" and "32blit game.blit" will flash a game.
- Flasher: fixed a bug where it would reset an open connection and break during a flash
- New: Version tool: 32blit version
- Packer: Format support for wildcard asset names
- New: migrated PIC relocs tool into tools
- Packer: Fix asset path handing to be relative to working directory
- Flasher: Add list/del commands
- Packer: Fix bug where asset packer shared class instances and state
- Metadata: Find images when building from a config not in working directory
- Metadata: Require only one of --file or --config options
- Export metadata config to CMake
- Add support for packing metadata splash to icns format for macOS
- Fix palettes to support 256 colours (count will be 0)
- Parse metadata and relocations with Construct
- Breaking: Packed image format has changed!
- Add support for PIC reloc'd binaries with RELO header
- Add string arg support for asset filename to cmake tool
- Add autoreset from game to firmware when running
flash infoto determine if in game or firmware
- Add metadata dependency output from cmake tool
- Fix asset dependency output to include additional files like palette
- Redirect errors to stderr
- Quiet! Use -vvvv for info, warnings, errors and debug information.
- Add metadata tool - tags binary with metadata from a .yml file
- Fix relative paths for packer palette files
- Add support for subdirectories to
32blit flash save
- Font tool (thanks @Daft-Freak)
- Flash command with multi-target function (thanks @Daft-Freak)
- Bugfixes to palette handling (thanks @Daft-Freak)
- Bugfixes to package recognition (seemed to affect Python 3.8 on Windows)
- Friendly (ish) error message when a .tmx tilemap with 0-index tiles is used (tmx is 1-indexed for valid tiles)
- Output data length symbols (thanks @Daft-Freak)
- Fix --packed to be default, again (packed can be disabled with --packed no)
- Various other tweaks
- Start of 32blit file upload support
- Default images to packed (packed arg now takes a bool)
- Fix bug in sprite payload size (thanks @Daft-Freak)
- Fix packaging mishap so tool actually works
- Real initial release
- Pack, cmake and asset commands working
- Very beta!
- Initial Release
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size 32blit-0.6.1-py3-none-any.whl (32.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size 32blit-0.6.1.tar.gz (28.8 kB)||File type Source||Python version None||Upload date||Hashes View|