Bear with me…

Okay, so good news and bad news…

The bad news is, I deleted half the code in the clade diagram and now have to start rebuilding the movement and collision mechanisms from scratch.

The good news is, I totally did it on purpose! Yay!

Bear with me for a bit. I know I said I’d be moving on to 0.7.0 soon, but trying to fix the problems with the clade diagram finally pissed me off enough to give it a full exorcism. Pentagrams, holy water, latin gibberish, the whole shebang. I knew watching all those episodes of Supernatural would come in handy.

I’m remaking it in a more abstract format: rather than each clade leg being responsible for repelling it’s neigbours and continually performing collision checks against everything else to ensure this (as you might do in a physical simulation), it’s being organised into a list of vertical strips, which I’m calling tiles for no apparent reason.

When a clade splits, it pushes one child into the tile on it’s left, and the other into the tile on the right. Collision checks only need to be performed during these Push events, and only against the clades already in the tile they’re going into: two clades cannot share the same tile at the same time.

So, the actual good news is: I’ve only spent a morning on it, but I’m already getting results. The code for the method is much smaller and easier to read, which in turn makes it simpler to debug. With luck, this remake won’t take too long. I’ll update this post at the end of the week to let you know how I’m going.

  1. #1 by waynetrebbin on July 3, 2013 - 1:45 pm

    When I let 0.6 run for a while I find that instead of everything moving smoothly movement becomes hesitant: stop and go. Hope this is useful

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: