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!)

 

4 thoughts on “Ivy, Trigonometry, and Life…

  1. Congratulations on getting your new house!!! 😀 The backyard looks lovely, and I hope that it will be a good home for you and your husband. 🙂 The moving process will go quicker than you realise… especially as you see your new house become your new home. 🙂

  2. Aww good luck with the new house ^^
    and yay for Ivy,it’s a thing I been looking forward to,I find it interessting that you going to try make it so it climbs : D

    Oh and don’t worry about delaying my Toxes,I understand ^^
    I still have to get myself writting the read me too -sorry for that,I haven’t started,I’ve been coloring pics,try to finish of some to post up on my DA page ^^’

    Looks lovely btwn – Im sure you will thrive there,looks very nice :3

    • No need for delaying the Toxes. All we really have left is the readme stuff. The one weird little CAOS quirk is rare enough now not to bother anyone, especially since most people run the games with Autokill on. And then, maybe fighting with the ivy will teach me some new tricks so I can finally beat it into submission and do a quirk-free v2.0 toxe. 🙂

  3. Congratulations on the new house! I also finally stumbled across your blog after being ridiculously absent lately… Work and major surgery in the family tends to do that, though. Of course I’m late on commenting on everything, but your creations are fantastic! Amazing work, as I imagined it all would be. You’re inspiring me to someday dabble in CAOS, although I’m still leaving that to those who understand it. I have a bunch of unfinished projects, and I also need to get back to regular blogging, which should happen this week. Good luck with everything, and thanks again for working on all this! Creatures is becoming a much prettier game with all of your agents!

Leave a Reply

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