tophat2d / tophat

:tophat: a 2d game library for Umka
https://tophat2d.dev
BSD 3-Clause "New" or "Revised" License
72 stars 5 forks source link

ske: Atlas module that automatically packs a list of arbitrary images. #118

Closed marekmaskarinec closed 1 month ago

marekmaskarinec commented 8 months ago

Original issue:

~mrms/tophat#42

Initial message:

marekmaskarinec commented 8 months ago

@skejeton are you okay with atlas.Atlas.pack? If so, please close this.

skejeton commented 8 months ago

Is the cell size sparse or constant?

marekmaskarinec commented 1 month ago

It's constant, since tophat atlases don't allow variable cell sizes anyways.

skejeton commented 1 month ago

I think this works for games with blocks, although I was more thinking for atlases of texture regions, where the ordering doesn't matter. I think this is good enough for now though, if anything it could be an extension, and someone can make their own packer.