The third annual GB Pixel Art Jam, hosted by Bad_Dad and GB Studio Central, invited artists to submit a single work of pixel art that fits the restrictions of the Game Boy screen. Each image must be 160 x 144 pixels in resolution and contain no more than four colors in total. The Jam also adds a limit on the number of unique 8×8 tiles used in a piece, with a maximum of 192 tiles. This limitation reflects how GB Studio works, as a typical background has 256 tiles, but 64 are reserved for text and UI art.
Each year, the Jam introduces a theme to inspire participants. For the 2024 Jam, the theme was “Color,” with four separate color palettes available for artists to choose from. Unlike other Jams, this event has no competitive element. All qualifying entries are compiled in a Gallery “game” made for the Game Boy, available both digitally as a ROM file to download, and as a physical cart, thanks to insideGadgets.
Taking all the submissions and compiling the ROM is a multistep process, one that has evolved and improved with each iteration. While GB Studio provides a wonderful and straightforward interface to create such an experience, having to manually create every scene, credit and control for the game would be a time-consuming experience, thanks to the myriad entries (374 in 2024, for example), therefore scripting tools were developed to help the process along.
Validation
Since submissions must meet technical parameters — resolution, color depth and tile count — each piece of work needs to be validated for entry. For 2024, the GB Studio Central team divvied up the work to manually inspect each piece. Resolution is easily ascertained from the file information, and tools like Pixel Color Counter and ️GB Tile Counter can be used to determine the other two parameters. With a good number of people, validation didn’t take too long. Participants were then informed of any issues with their submission and given time to attempt correction.
Going forward, a more automated approach is being used. Using Python, a script was created to perform the repetitive tasks of checking file type and the parameters mentioned above. Specific libraries, such as pypng and img2gb, played a crucial role in this process. Getting all the files from Itch was also automated, utilizing the Itch.io game downloader, which grabs all the publicly available submissions from the Jam.
To keep all the data easy to parse, the Python script reads the submission information from a CSV file downloaded from Itch and then outputs a CSV file outlining any issues with the submission.

The GB Studio Project Format
To understand the next steps in creating the Gallery ROM, it’s essential to know how GB Studio stores project data. In previous versions, the entire project was stored in a single, giant project file. However, now projects are broken down into folders and specific .gbres files. Each one of these is a JSON-formatted text file containing values pertaining to the resource in question, along with a .bak file, which is a copy of the most recent save for backup purposes in case something goes wrong. These files can all be edited with a simple text editor, but if the JSON format is not respected, an errant colon, comma or bracket can break the whole project.

Since these are all text files, we can also generate them using a Python script. So for the Gallery ROM, a specific workflow was followed. First, we needed to have all the background .gbres files generated by GB Studio. This required the following steps:
- Create a new blank GB Studio Project.
- Organize all the submitted PNGs into a single folder, naming them sequentially with the artist’s name appended (this was done with a Python script as well).
- Add these PNGs to the /assets/backgrounds folder within the GB Studio main project folder.
- Reload the project to generate each one of those .gbres files in /project/backgrounds.
Opening up a .gbres file, we can see the following information:
{
"_resourceType": "background",
"id": "d73b9946-7da0-4792-8e6d-43a29069ca59",
"name": "001_2k6-games",
"symbol": "bg_gbassets_001_2k6_games",
"width": 20,
"height": 18,
"imageWidth": 160,
"imageHeight": 144,
"filename": "001_2k6-games.png",
"tileColors": "",
"autoColor": false
}Most of these attributes are self-explanatory, but pay attention to the “id” key. This is a randomly generated hash value constructed from hexadecimal pairs. Almost every unique item in a GB Studio project has a unique ID associated with it. This ensures that if you rename items in the project, links to those items remain intact.
If we create a simple scene, we can find the following information in its .gbres file (found in /project/scenes):
{
"_resourceType": "scene",
"id": "59295cc5-41bc-48c9-980d-f8376ed85c9f",
"_index": 0,
"name": "Scene 1",
"backgroundId": "1e5f9d6a-bdbc-43e6-8c34-22f5bb5dea05",
"tilesetId": "",
"width": 20,
"height": 18,
"type": "TOPDOWN",
"paletteIds": [],
"spritePaletteIds": [],
"collisions": "",
"autoFadeSpeed": 1,
"symbol": "scene_1",
"x": 61,
"y": 58,
"script": [],
"playerHit1Script": [],
"playerHit2Script": [],
"playerHit3Script": []
}Notice the “backgroundId” key? If you want to use the background listed above, we simply need to insert the “id” value from that background into the corresponding key. The other important areas to note are the “x” and “y” keys, which are the scene’s location on the GB Studio canvas in the editor, and the “script” array. If you add any scripts to your scene, these will appear in this area.
Generating the Scenes with a Python Script
We can now build a “template” scene with the scripts we want, copy that into a Python script as its output, then edit key areas as placeholders for variables. The scene name, index, x, y, and backgroundId can all be looked up from a CSV or generated accordingly. Here’s a sample of some of the Python code I created to do that:

The text in blue represents variables that are either set by reading a CSV or generated programmatically (such as the X and Y values). However, the creat_hash() function is worth noting. Reusing the same hash across different aspects of the project file, GB Studio will not be able to parse the project file correctly and things will break. To fix that, I created a function that randomly generates that hash. This is the code for that:
import random
def create_hash():
hexstring = ""
for x in range(16):
if x == 4 or x == 6 or x == 8 or x == 10:
hexstring += "-"
hexstring += f"{random.randint(0,255):02x}"
return hexstringThe benefit of this approach is that if an entry gets removed, changed or updated, you can just re-run the script and everything is generated again.
Changing Scenes and Displaying Artist Info
The last piece of the puzzle is managing how scenes change and how the artist’s info is displayed. While this could have been coded into each scene, a more programmatic approach was appropriate. Instead of having to consider what each scene’s before/after scene is, have one big switch with all the scenes, and assign an “ID” variable to each scene. This has several advantages, but the most significant one is that you can also use it for the Scene Index when navigating the Gallery. Simply call the script with the scene ID variable, and it will determine which scene to load.
It’s a slog to do this manually. I did this for the jam’s first year. Since [Switch] events in GB Studio have a maximum of 16 values, I created 140 [If Variable Compares to Value] events and manually set each one. For the 2024 gallery, I instead relied on Python code to read the values in a CSV and then, this time, export a GBVM script that I could copy and paste into a GB Studio Event:

GBVM in GB Studio allows for switch statements with up to 255 cases, so I did some math at the front of the switch to account for exceeding the limit of 343 scenes. The result looked something like this:
.include "macro.i"
;Fade Out
VM_SET_CONST_INT8 _fade_frames_per_step, 1
VM_FADE_OUT 1
VM_IF_CONST .LTE, VAR_SCENE_ID, 255, 100$, 0
VM_JUMP 101$
100$:
;Scene Switch
VM_SWITCH VAR_SCENE_ID, 255, 0
.dw 1, 1001$
.dw 2, 1002$
.dw 3, 1003$
.dw 4, 1004$
.dw 5, 1005$
.dw 6, 1006$
.dw 7, 1007$
.dw 8, 1008$
.dw 9, 1009$
…
.dw 250, 1250$
.dw 251, 1251$
.dw 252, 1252$
.dw 253, 1253$
.dw 254, 1254$
.dw 255, 1255$
1001$:
VM_RAISE EXCEPTION_CHANGE_SCENE, 3
IMPORT_FAR_PTR_DATA _scene_1
1002$:
VM_RAISE EXCEPTION_CHANGE_SCENE, 3
IMPORT_FAR_PTR_DATA _scene_2
1003$:
VM_RAISE EXCEPTION_CHANGE_SCENE, 3
IMPORT_FAR_PTR_DATA _scene_3
1004$:
VM_RAISE EXCEPTION_CHANGE_SCENE, 3
IMPORT_FAR_PTR_DATA _scene_4It looks a little crazy, but again, that’s all being managed by the Python script, so I just hit run, and it gets generated. I followed a similar approach for the artist info. Read the CSV file and generate a GBVM Switch that will render the information on screen according to the ID:

The GBVM code at the bottom that closes out the dialogue box. Without it, it won’t work. The resulting code looks something like this:
VM_IF_CONST .LTE, VAR_SCENE_ID, 255, 100$, 0
VM_JUMP 101$
100$:
;Scene Switch
VM_SWITCH VAR_SCENE_ID, 255, 0
.dw 1, 1001$
.dw 2, 1002$
.dw 3, 1003$
.dw 4, 1004$
.dw 5, 1005$
.dw 6, 1006$
.dw 7, 1007$
.dw 8, 1008$
.dw 9, 1009$
…
.dw 252, 1252$
.dw 253, 1253$
.dw 254, 1254$
.dw 255, 1255$
1001$:
VM_LOAD_TEXT 0
.asciz "Artist:\012@lafontaine_dl"
VM_JUMP 10$
1002$:
VM_LOAD_TEXT 0
.asciz "Artist:\0123D"
VM_JUMP 10$
…
1341$:
VM_LOAD_TEXT 0
.asciz "Artist:\012Yoush"
VM_JUMP 10$
1342$:
VM_LOAD_TEXT 0
.asciz "Artist:\012Yusof Iranmanesh\012GreenCube"
VM_JUMP 10$
10$:
VM_OVERLAY_CLEAR 0, 0, 20, 5, .UI_COLOR_WHITE, ^/(.UI_AUTO_SCROLL | .UI_DRAW_FRAME)/
VM_OVERLAY_MOVE_TO 0, 18, .OVERLAY_SPEED_INSTANT
VM_OVERLAY_MOVE_TO 0, 13, .OVERLAY_IN_SPEED
VM_OVERLAY_SET_SCROLL 1, 1, 18, 5, .UI_COLOR_WHITE
VM_DISPLAY_TEXT
VM_OVERLAY_WAIT .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT | .UI_WAIT_BTN_A)/
VM_OVERLAY_MOVE_TO 0, 18, .OVERLAY_OUT_SPEED
VM_OVERLAY_WAIT .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT)/Putting it All Together
In the end, there was still a fair amount of manual work to get it all working, particularly with the indexing of artists. I put as much time into coding all the generating tools as I would have done manually, so it took a long time to get it out. However, I now have an awesome template to work from that should make it easier to generate the Galleries going forward and get them out to our participants sooner.
I’m also excited for the Gallery to have its first physical installation, premiering at Sheridan College, with the show running until February 2026. If you’re in the Greater Toronto Area in Canada, you can visit the Creative Campus Gallery on the Second Floor of B-Wing at Sheridan’s Hazel McCallion Campus in Mississauga to see it in person. Gallery is open from 11 AM – 4 PM, Monday to Friday.

Audio Engineer, Mac Technologist and Video Game Developer. Former Managing Editor of GBStudio Central. (he/him)





