rollie pollies


I decided to make a little Isopod

imgcred

I looked up “funky bugs” and saw this little guy. It reminded me of when I was younger, playing in the backyard with these with my friend K. We called them “rolly pollies” because they roll up into a little ball when spooked. We had so much fun rolling them around. Unfortunately, they were of the woodlice family–their family was deteriorating the structure of the wooden base of the house. Luckily, that was Not Our Problem! undefined Look at this little cutie. (imgcred)

After some brief research I went to drawing trying to breakdown the structure of the isopod into basic primatives so I could them replicate it in code. During sketching I decided how the limbs would function (loosely based on how it actually works), how many of them to make. etc. Basically conjuring up more work for myself than I needed to

this took about 8 minutes of finagling to get the first pereomere shape. I started with just one pereomere and spaghetti-coded the rest of the form in the shape of the form.

Sitting at 91 lines of code I was extremely uncomfortable with how redundant and long the code got–but for the sake of the code looking like the bug I persevered.

The code will go through some sort of shortening, quite like the bug itself rolling up into a ball. That realization alone gave me the motivation to finish the form in this way.

at a brisk 125 lines of code i finally finished..for the night I still need to add legs.

Here I am next day to work on it. leg time!

wow i hate that the code looks like this. makes it extremely difficult to classify. SO, off I went to get the relationship of every point to the center of the canvas so I can make this thing draw anywhere.

that took an hour but now I we get a random family every time you load the canvas

I added scale for sillyness. Overall, great success. I’m really happy with how these little bugs turned out even if it’s so simple ok now I’m happier.

My only issues with this is it’s inconsistencies generating on the canvas, I’d add legs, a little function to make them move around randomly, and I’d set a timer to randomly make them roll into balls.

Integrating vectors should do the trick. plus a little ball class. https://natureofcode.com/vectors/

go check it out here

Leave a comment

Log in with itch.io to leave a comment.