First “Game” Coding Since Whenever

While I still program for a living, I stopped doing game development a couple years ago. But yesterday I fired up Solar2D (previously known as Corona SDK) and wrote a few lines of code to play around with the idea of a Quilt Block Shuffler (QBS). (So it wasn’t a game per se, but I was using a solid game framework.)

Wanda is making a quilt and she sewed 56 blocks and is then putting them together to make the quilt. She laid out all 56 squares on the bed, took a picture, rearranged them, took another picture, etc. This went on for a couple days — you know, once you sew them all together you’re kind of stuck with whatever design you chose. No good way for a “do over” in this scenario!

She has many different quilt blocks, although they’re all in the design you see here — just different fabrics used for the different squares, but all match the “teal and purple” scheme she has going on.

I realized why I don’t make quilts — it would drive me insane to lay out all those blocks over and over again in different patterns just to see which I liked. And so, my brain turned to a computer program that would let you do that kind of thing quickly, over and over again…

So I fired up my new code editor (Nova by Panic, which is muy bonito y elegante*) and grabbed some grid code from just about every game I wrote in the last decade, and in a couple hours had the base of an app that would allow you to take pictures of multiple blocks and then reform them in different patterns, rotating each block based on different rules.

Quilt Block Shuffler in the Solar2D iPad simulator. Nova editor in the background.

You can tap each block and rotate 90 degrees on each tap, to completely customize the look. Add space between each row and/or column, change the background color, etc., although many of the options didn’t get a UI last night.

And then this morning Wanda said she decided on a pattern — one of the ones she laid out on the bed. So I really don’t have any impetus to finish QBS.

But this was the first time I’ve sat down and created something (or part of something) in Solar2D in quite a while and it was really fun. During the week I code in C# and it just feels nice to use something more friendly like Lua and Solar2D.

* Thanks, Duolingo!

Leave a Reply

Your email address will not be published.