Spritely

I’m currently working on a new tool for ANGELINA that will let it automatically rip and compress images from the web into sprites that can be used in-game. Here’s a few examples of dogs:

spritely_dogs

It’s as basic as it looks – we really do just shrink down images. We can add some post stuff too, like colour schemes. Here’s an American bomb and a jungle cat:

Screen shot 2012-12-29 at 17.50.54

This time I’m trying to write the software in such a way that I can release it for use by developers if they want something simple to generate sprites. Developers already use such tools for generating music and sound effects, mostly for placeholders in games, or during game jams where time is of the essence and content is temporarily less important. Visuals are a little harder to generate procedurally, so Spritely is an attempt to build a halfway house – it’s shameless, but it gets the job done, no matter how crappily.

I’m still working out exactly how this should work. Should it be a command-line thing, should it have a GUI, should it be a library? I don’t really want to build a front-end so I may initially just release the code on the GitHub page. Hopefully we’ll see a release sometime in the next month or two – January is quite busy. There’s a few kinks to iron out as well: silhouette searches give really good results for shape, but there’s no texture there so the sprites look very plain. I’m going to experiment with retexturing the silhouettes before applying palettes, but it might not come out very well.

If I manage to slap a front end on, it’ll let you change searches, choose sources (I’ve got things like OpenClipart added in, and I’ll add in creative-commons searches), swap out palettes for recolouring and switch off any of the extras I use by default. It’ll also mean that ANGELINA can start using art from the web, which will be just dandy.

Screen shot 2012-12-29 at 18.12.18

3 thoughts on “Spritely

  1. This looks super interesting! I might play around with the code on github (or the download) later. I have one idea that may yield immediate quality improvements, though: I assume once you fetch the image, you have some algorithm that removes the background, yes? You might want to consider, before scaling down, to surround the shape with a border of a few black pixels. Then scale it down with a nice interpolation algorithm. That way you get a nice sort of black outline fade in the sprite, which would greatly increase contrast and perception of shape. The thickness of the border should probably be set so that after scaling down it is slightly less than one pixel thick (so you don’t get a very fat or thin border).

    Great site/blog, btw. I’m still reading through your archives, very interesting stuff. I’m just an amateur/hobbyist game designer (although I do teach making computer games to kids, but PCG would just complicate things for them, I think). AI/Alife (and later when I heard about it, PCG) have always been my passion to get into programming, though.

    1. This is a really interesting idea! I do remove the background as you say, and I like this idea of a black border. I’ll definitely have a look at it next time I find the time to return to Spritely!

      Let me know if you want to chat PCG or anything like that – mike@gamesbyangelina.org. I’m always interested in hearing from educators. How would you teach PCG to kids? That’s a pretty fascinating idea.

Leave a Reply

Your email address will not be published. Required fields are marked *