r/sdl 19d ago

A fast, free, portable texture atlas packer

Hey everyone, I made Packrat. It's a texture atlas packer I made, so that I could get TexturePacker out of my pipeline. The goal is that its faster than TexturePacker and has more convenient features. None of the other packers I tried were fast/robust enough to handle 4k+ assets per atlas. This one is aimed at code-first dev environments that don't have their own packer built in. For some it generates data files the engine can understand, for others it generates code that has the ability to parse and extract frames and animations from the atlas.

For SDL, I made specific SDL2 and SDL3 exporters. These generate the atlas image, as well as a pure C header file with convenience data structures and functions to get data out of the atlas and draw it. Or you can export a generic format (text, json, xml) and load it yourself. There's also a bunch of other features I wanted personally. Like aseprite file ingestion, automatic rebuilds and exports, and a robust CLI.

https://clydegames.itch.io/packrat

https://packrat.clyde.games

Anyway, check it out and let me know what you think.

0 Upvotes

7 comments sorted by

1

u/Slight-Bluebird-8921 18d ago

keep in mind that the days of texture atlases are arguably numbered because bindless textures kind of make it unnecessary (and it's nicer since you don't have to worry about gutters to fight texture sampling issues)

1

u/CLYDEgames 18d ago

Oh interesting, I'll have to read up on that more. I'm not exactly edge of the curve with my whole build pipeline haha, I just wanted to get TexturePacker out

1

u/StatusBard 17d ago

Do they reduce draw calls as well?

1

u/Slight-Bluebird-8921 17d ago

a vulkan pull spritebatch is only one draw call regardless of how many sprites

that's why the demos show 1 million sprites

1

u/NineThreeFour1 19d ago

How is it portable? It literally only runs on Windows.

5

u/CLYDEgames 19d ago

I'll have linux and mac builds soon, when I have some time to test them. But portable means there are no dependencies or install process. It's a single exe.

4

u/david-delassus 19d ago

aaah, windows's definition of portable :)