Fork me on GitHub
#quil
<
2022-03-21
>
plexus10:03:20

you might find some useful stuff in here, especially if you're starting from pixel art images / spritesheets https://github.com/lambdaisland/cljbox2d/blob/main/src/lambdaisland/quil_extras.clj

plexus10:03:39

there's code in there to scale images without smoothing, and to slice up spritesheets

Vinicius Vieira Tozzi21:03:23

wow this is pretty cool! thanks, does it make sense to add cljbox2d as a dependency to my little game even if I don’t plan on using any physics simulation? Just for the quil-extras there. this is very useful on any type of game.

plexus03:03:46

You'd be pulling in jbox2d but maybe that's not a big issue for you. Or just copy the namespace to your own project.

plexus03:03:42

Maybe you also find this useful, code to split sprite sheets back into individual images https://github.com/lambdaisland/puck/blob/main/src/lambdaisland/puck/sprite_splitter.clj

plexus03:03:05

A lot of sprite sheets you find don't come with the necessary coordinate information of what's where on the sheet. I used this to unpack them, select the ones I need, and then repack with existing tools. If have to look around to see what I used for that though