8-bit Sprites

For my website-of-the-month for July, I’ve decided to turn my newly gained obsession with Perler beads into a full blown website.

8-bit Sprites, just launched, is going to feature a new Perler bead sprite every week. Each sprite post includes instructions on how to make it on your own, or you can leave a comment for a chance to win it.

This site was a ton of fun to make. Aside from making a couple dozen Perler sprites already, I also wrote some fun code to make the maintenance of this website easier:

First, I wrote a page that lets me fairly easily create an XML document that defines the colors and positions of the beads required for each design. It still takes a few minutes to manually translate an image into an XML document, but it is much easier than doing it completely by hand.

Next, I wrote a custom WordPress plugin that reads this XML document. It counts how many beads of each color are needed, how big of a pegboard you’ll need, and generates a pattern image that can be used by anyone that wants to create the sprite on their own. This is really cool because it lets me add new features to the patterns without having to update old posts.

The plugin uses custom shortcodes to make it super easy to create my weekly posts. One shortcode simply takes the path to the XML document as a parameter, and uses that to display all the details about the sprite. Another shortcode makes it easy to include consistent contest rules/guidelines on each post. It also uses the post date to automatically close the contest each week.

I already have a thousand ideas on how to make this site better, but I wanted to get the bare minimum done so I’d at least get it out the door and published before the end of the month.

Leave a Reply

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