(currently in private beta https://www.patreon.com/posts/nextbuild-studio-133526642)
Repo for NextBuild Studio
NextBuild Studio is a Visual Studio Code fork that adds support for ZX Next development.
It includes the following features:
- Sprite Editor
- AYFX Editor
- ProTracker 3 Module Playback
- Block Editor
- Map Editor
- Image Viewer / Importer
- File Icon Theme
- Creation Tools
NextBuild Studio is a fork of Visual Studio Code that adds support for ZX Next development. A comprehensive language syntax linter is included, and the editor is fully customisable, allow you to hide common warnings and errors. NextBuild studio features as you type syntax checking and auto-completion.
- Custom editor for ZX Next files
- Support for ZX Next sprite files (.spr), font files (.fnt), palette files (.pal, .nxp) and tile files (.til, .nxt)
- Support for ZX Next block files (.nxb)
NextBuild Studio includes a comprehensive help system that provides detailed information about the ZX Next file formats, as well as a comprehensive list of commands and their usage.
- Comprehensive help system for ZX Next file formats
- Detailed information about ZX Next file formats
- Comprehensive list of commands and their usage
NextBuild Studio includes a comprehensive list of action buttons that provide quick access to the most common actions.
NextBuild Studio now officially supports creating programs and games using a moduler system. All handled seamlessly within the IDE.
NextBuild Studio includes a convienient template system that allows you to quickly create new projects.
- View ZX Next palette files (.pal and .nxp)
- Proper support for the ZX Next's 9-bit RGB color format (3 bits per component)
- Displays colors with index information
- Compact UI optimized for palette viewing
- View ZX Next sprite files (.spr), font files (.fnt), and tile files (.til, .nxt)
- Support for multiple ZX Next sprite formats:
- 8-bit sprites (16×16 pixels, 256 colors)
- 4-bit sprites (16×16 pixels, 16 colors with palette offset)
- 8×8 font characters (256 colors)
- 8×8 tiles (16 colors with palette offset)
- Interactive viewer with zoom, grid view, and palette loading
- View ZX Next block files (.nxb)
- View ZX Next map files (.nxm)
- Interactive display of block data
- Support for different block formats
- View ZX Next image files (.nxi)
- Support for screen layer formats (.sl2, .sll)
- Display of ZX Next image formats with proper colors
- Import sprites from standard image formats (PNG, JPG, GIF, BMP, etc.)
- Extract multiple sprites from a single image using:
- Manual selection for individual sprites
- Grid-based selection for sprite sheets
- Adjustable grid cell size for different sprite dimensions
- Preview sprites before importing
- Convert to different ZX Next sprite formats:
- 8-bit sprites (256 colors)
- 4-bit sprites (16 colors)
- Automatic color quantization to match ZX Next palette formats
- Load custom target palettes for precise color matching
- Extract and save palettes from source images
- Manage multiple sprite selections in a list before exporting
- Export as .spr or .til files
- Import "panels" from images for use with DrawImage()
- Custom file icons for ZX Next file types
- Includes icons for:
- Palette files (.pal, .nxp)
- Sprite files (.spr, .fnt, .til, .nxt)
- Block files (.nxb)
- Map files (.nxm)
- Image files (.nxi, .sl2, .sll)
- ProTracker 3 modules (.pt3)
- BASIC files (.bas)
- NextBuild executable (.nex)
- Binary files (.bin)
- Compatible with other icon themes (can be toggled on/off)
- Support for playing .pt3 music files
- Integration with playpt3.exe (configurable path)
- Create new sprite/font files with customizable parameters
- Support for map and block editing
- Edit AYFX files (.afb)
- Create new AYFX files (.afb)
- Right-click on a .pal or .nxp file in the Explorer and select "Open with ZX Next Palette Viewer"
- Double-click on a .pal or .nxp file (the extension is set as the default editor for these files)
- Right-click on a .spr, .til, or .nxt file in the Explorer and select "Open with ZX Next Sprite Viewer"
- Double-click on any supported sprite file (the extension is set as the default editor for these files)
- Use the view mode dropdown to switch between different sprite formats
- Adjust the palette offset for 4-bit sprites and 8×8 tiles
- Click on any sprite to see a detailed view
- Use the Scale slider to adjust the sprite display size
- Toggle grid lines with the Show grid checkbox
- Load a custom palette file using the "Load Palette" button
- Right-click on a .nxb or .nxm file in the Explorer and select "Open with ZX Next Block Viewer"
- Double-click on a .nxb or .nxm file (the extension is set as the default editor for these files)
- Right-click on a .nxi, .sl2, or .sll file in the Explorer and select "Open with ZX Next Image Viewer"
- Double-click on any supported image file (the extension is set as the default editor for these files)
- Run "NextBuild: Import Sprite From Image..." command from the Command Palette
- Select an image file (PNG, JPG, GIF, BMP, etc.) to import from
- Use the importer interface to:
- Manually select sprites by dragging on the image
- Enable grid view to see sprite sheet divisions
- Adjust grid cell size to match your sprite dimensions
- Set output format (.spr or .til)
- Choose bit depth (8-bit for 256 colors or 4-bit for 16 colors)
- Load a target palette for color matching (required for 4-bit output)
- Use "Add Selection to List" to add each selection to the sprite list
- Preview how sprites will look when imported
- Click "Export Sprite Sheet" to save selected sprites
- Optionally extract and save the color palette from the source image
- Enable the NextBuild File Icons theme in VS Code:
- Go to Settings → File Icon Theme
- Select "NextBuild File Icons"
- You can toggle between the NextBuild icons and other icon themes using the command:
- Press
Ctrl+Shift+Pand type "NextBuild: Toggle ZX Next File Icons"
- Press
- Set the path to playpt3.exe in the extension settings
- Right-click on a .pt3 file in the Explorer and select "Play PT3 Module with playpt3.exe"
- Use the "NextBuild: Create New Sprite/Font File..." command from the command palette
The extension provides tools to find and remove duplicate sprites in your sprite files:
-
From the Sprite Editor:
- Open a sprite file in the sprite viewer
- Click the "Analyze Duplicates" button in the toolbar
- Review the report in the output panel
- Optionally highlight duplicates in the editor
- Save a deduplicated version if desired
-
From Explorer:
- Right-click on a sprite file (.spr, .til, .fnt, etc.)
- Select "NextBuild: Analyze Sprite Duplicates"
- Follow the prompts
-
From Block/Map Editor:
- Open a block (.nxb) or map (.nxm) file in the block viewer
- Make sure a sprite file is loaded
- Click the "Analyze Duplicates" button in the toolbar
- Review the report in the output panel
- Choose whether to update the block/map references when saving the deduplicated sprite file
When you analyze duplicates, the extension will:
- Find exact matches as well as flipped and rotated sprites (configurable)
- Generate a detailed report with potential space savings
- Optionally save a deduplicated sprite file
- Optionally update block/map files to reference the new sprite indices
This maintains the visual appearance of your blocks and maps while reducing sprite data size.
ZX Next palette files use a 9-bit RGB format (3 bits per color component). Each color entry takes 2 bytes:
- Byte 1:
RRRGGGBB - Byte 2:
-------B(only the least significant bit is used)
This gives a total of 512 possible colors (8 levels per RGB component).
The ZX Next supports multiple sprite formats:
- 8-bit Sprites: 16×16 pixel images using 8-bits for each pixel (256 colors). Each sprite requires 256 bytes.
- 4-bit Sprites: 16×16 pixel images using 4-bits for each pixel (16 colors). Each sprite requires 128 bytes.
- 8×8 Font Characters: Similar to sprites but in 8×8 format with 256 colors.
- Tiles: 8×8 pixel images using 4-bits per pixel (16 colors).
Maps reference a collection of blocks. Each block is an 8×8 arrangement of tiles with attribute data.
The optimized block format (.oxb) is a more efficient way to store blocks for ZX Next development:
- Only stores non-empty sprites within blocks, saving memory
- Preserves original block dimensions and structure
- Stores sprite positions (x,y) and sprite indices for each non-empty sprite
- Useful for games and applications where memory efficiency is important
- Traditional blocks store all sprites in a block (including empty ones)
- Optimized blocks only store the sprite data that's actually visible
The binary structure of the optimized block format is as follows:
Header (7 bytes):
- Bytes 0-1: Magic number "OB" (Optimized Blocks)
- Byte 2: Version (currently 1)
- Byte 3: Original block width in sprites
- Byte 4: Original block height in sprites
- Bytes 5-6: Number of blocks (little-endian)
For each block:
- Byte 0: Number of sprite positions in this block
- For each sprite position:
- Byte 0: X position (offset from block origin)
- Byte 1: Y position (offset from block origin)
- Byte 2: Sprite index
Size Comparison:
- Traditional block format: Block count × (width × height) bytes
- Optimized block format: 7 + Block count × (1 + visible sprites × 3) bytes
For example, a map with 100 blocks, each 2×2 sprites, with an average of 2 non-empty sprites per block:
- Traditional format: 100 × (2 × 2) = 400 bytes
- Optimized format: 7 + 100 × (1 + 2 × 3) = 707 bytes
However, if the blocks have more empty space:
- For the same 100 blocks with an average of 1 non-empty sprite per block:
- Traditional format: 400 bytes
- Optimized format: 7 + 100 × (1 + 1 × 3) = 407 bytes
The optimized format becomes more efficient as the blocks contain more empty space or when the blocks are larger (like 4×4 or 8×8).
- .nxi files are ZX Next image files
- .sl2 and .sll are layer files (screen layers)
This extension contributes the following settings:
nextbuild-viewers.playpt3Path: Path to playpt3.exe for playing PT3 music modulesnextbuild-viewers.respectExistingIconTheme: When true, will not show icon theme notification if another theme is already active
I am looking for people to join me to help keep development going on all platforms. If you can help, get in touch.
MIT
em00k - Creator of NextBuild tools for ZX Spectrum Next development










