Ivy, Trigonometry, and Life…

…in which I whine about CAOS and squee about my new house.

I’ve just started my third complete rewrite of the ivy growth logic. The first one failed miserably at even just growing along a relatively horizontal surface. The slightest upward incline threw monkey wrenches into the logic, and my tests eventually revealed that for some reason, the CAOS engine was convinced that for the next several meters (for creatures) or inches (for me) after obst balked at one of those barely-discernable incline changes, the mvsf command would insist on placing the ivy FAR above the awful, scary one-pixel-high obstacle in its path — like ‘way up at adult norn shoulder-height, if not higher.

All of that meant that somehow I had to find a way to make my ivy smart enough to sense what’s ahead of it and choose the location for its next segment without the help of either obst or mvsf. And have I mentioned, I’m just a CAOS beginner? *sigh*

Since then I’ve had to invent new ways of detecting obstacles, and haul out my high school trigonometry skills (of which precious little still survives after all these years) to make the stuff work. The second iteration of the code worked beautifully, as long as the ivy only had to grow toward the left along a floor. For a while I just planted it in various places and watched like a proud parent as it happily navigated up and down the many inclines in C3/DS, until it ran into a wall (where it stopped) or encountered a dropoff (where it also stopped).

But after a while, watching ivy grow leftward gets old, and it runs out of floor. That’s when I discovered that in order to make it turn and grow upward, or to add right-growing capability, I was going to end up multiplying what already amounted to hundreds of lines of code by however many different directions it needed to know how to travel in. Ouch. And the code was so complex already that just converting it to go to the right (changing signs of X-coordinates, adding Xs instead of subtracting, that sort of thing) was a huge headache. Making it climb (transposing of Xs with Ys AND various changing of signs and plus/minus operations) was a nightmare. And since I was always one of those coders who write the code and THEN figured out what the flow chart should look like (to the consternation of my instructors), I couldn’t even begin to modularize the mess I had created into any sort of reusable subroutines.

To further complicate matters, I had put the ivy away for a few weeks while I worked on Norngirl’s Toxes, and then had to completely reinstall C3/DS when it all suddenly decided to stop working. That took a while, because it happened when there was a lot going on at work and I didn’t have much time to spend on it. And then just about the time I had it working again, we decided to buy a house, which is VERY distracting (but in a very happy sort of way). All of that time away from my code meant that when I sat down to work on it again, I could barely tell what I was doing in all the tangled spaghetti mess of it, much less try to expand on it.

So today I put away the computer and reacquainted myself with my long-lost friends PENCIL and PAPER. And after filling 7 pages with scribbles and diagrams and notes, I’ve got the foundation laid for a more organized and robust approach to the logic of growing ivy leftward, in a way that will make it simpler to expand into growing rightward, and then upward on a wall to the right, or upward on a wall to the left, and maybe even, eventually, along a ceiling.

I have no idea how long it will take to convert it from graphite to electrons and get it all translated into actual CAOS code, since most of my free time for the next few months will be devoted to the process of moving (*groan*). Our new house is awesome, though. It’s out in the country, with lots of space and fresh air, and this amazing back yard:

Oh, the CAOS I can code with a view like that! So be patient with me; there will be more agents (including this confounded ivy) coming in the future.

(If you want them sooner, you’re welcome to come help me pack!)



I’ve gotten quiet lately…for a while there, I was churning out agents left and right, but they were mostly pretty simple things that didn’t take too long to finish. The reason for the quiet is that I took on a couple of more complex projects. One is a joint effort with Norngirl, to bring her toxic roses to life, and I think we’re almost ready to release it. (Yay!) The other was a late-night inspiration I had for an ivy agent which, instead of growing in one spot and spreading by tossing out seeds or spores, would crawl and climb and spread itself via runners, just like real-life ivy. I wondered why no one else had come up with it, in all the years Creatures has been around, until I actually started trying to do it, and then I found out. It’s HARD! But that hasn’t stopped me, only made me more determined.

Then my creaky fragile Creatures Exodus installation, which runs in a virtual Windows XP partition on my MacBook Air, crashed. Argh! It took me several days of tinkering to get it reinstalled and working again, but I think it’s more solid now, since I took the time to figure out how to eliminate the multiple directories and get it all properly placed in the Documents directory. I’m excited about finally being able to see catalogue files! 🙂

Then we went live with new EMR (electronic medical record) software at work, for which I’m a “superuser” (sadly, I didn’t get a cape!), and I ended up working a 7-day stretch when a sudden tsunami of psych consults hit and I had to wear both hats at once for a while.

I think things have settled down a bit now, so I can get back to coding. (I’d cross my fingers, but that makes it hard to type.) So stay tuned, you haven’t heard the last of me!


The ivy was threatening to make me crazy, so I’m taking a short break to let it “cook” in the back of my brain while I help Norngirl with one of her agents. As usual, it’s a learning process. One of the things I’m learning more about is the physics of the C3/DS world.

This is one of the loveliest mistakes I’ve ever made. 🙂 I kind of forgot to tell the seeds they shouldn’t sprout if they were in mid-air, and I also forgot to tell the roses that they shouldn’t be able to grow in mid-air (because I really never expected them to try it). This is the result:

Alas, when the agent is finally released, you won’t be able to achieve this lovely cascade effect, because the seeds and flowers will have been properly educated to behave themselves as proper imaginary plants and flowers should.


Last night, after staying up ‘way too late watching a movie with my son (visiting from Maryland) and daughter, and just as I was happily drifting off to sleep, I suddenly had an idea for a new agent. Which meant that I was immediately wide awake again, and for the rest of the night I was dream-coding instead of properly sleeping.

Despite the sleep deprivation-induced brain-fog I’ve had all day, I’ve actually managed to get the beginnings of the code working. I thought I’d share a little preview with you:

Ivy! Just as invasive as its real-life cousin, but 100% edible leaves for your critters and creatures to enjoy snacking on, with lots of potential detritus and ecological effects. For the moment, though, I’ve got my hands full just getting it to creep and climb properly. This one’s gonna take a while…it just keeps getting more complex the more I work on it. Wish me luck!