r/codedbyhand • • 1h ago

Starting a GBA Tile Maker

Post image

My previous post on GBA programming got so much love, thank you all, it’s very encouraging.✌️

I quickly realized that solid colored tiles were easy, but specialized ones were not! And I couldn’t find any suitable tile editor that ran on my computer and came with documentation, so I decided to make my own with C and Raylib.

The GUI shows an 8x8 pixel tile, pressing the left or right key changes the palette color, and clicking draws the pixel on the GUI and assigns that cell the palette index number. If you press the key for export, it will create tile.txt, which contains a C array of 32 shorts, each containing the palette index for two pixels. Then, you paste the array into your code, copy the indices to vram, and viola! You’re now free to use that tile in your tilemap.

It’s severely limited right now. It’s hardcoded to the specific palette I’m using, 8bpp mode, can only export C arrays, can’t load images from array data, can’t be resized, no tilemap support, crummy GUI….these are things I’ll fix later! For now I’m just satistfied that it works.

8 Upvotes

2 comments sorted by

2

u/hypersonicwilliam569 57m ago

cool

might or might not be helpful if I make a GBA emulator

1

u/bird_feeder_bird 41m ago

I’ll share a build once I improve it a bit.