Monday, October 15, 2012

DSDN 142: A Growing Tree!

V = Victory!

if  (code looks like this){
V = true
}

Yay! Success has been achieved in the solar linkage to the plant! I now have a plant that grows due to the existence of suns on the canvas. This is really cool, because it's exactly what my interaction is about. Having been able to get the suns into my main code, this then allowed me to link the growth of the plant to the duration of the suns existence.

Another element I was able to shape to my will was the Sundrive code. That code forced the tree to grow upwards, but I reshaped it to grow in the direction of the existant suns. I also incorporated a random element into it so it's not entirely clear that the tree is gravitating to the suns, so that the user feels like they have an element of control, but they in no way really control how something can grow naturally.

This sense of the natural creation process being something not entirely controllable means that the user will feel also an odd sense of disconnect with the plant, and realise that this is the way nature works. Plants grow towards what they need, but at the same time there is an inherent sense of randomness to their patterns.

The main problem that I still have at the moment is that the background needs to refresh for the suns to disappear again and actually look the way that they should, but if I refresh the background, the tree disappears. I don't want that. So that'll be something to figure my way around.

The battle with the code rages on, so having a small victory like this is important to me. The tree is lookng good, but the next thing I had to do was get some colour into it. Compared to the rest of this, this is the easiest thing I've had to do in a very long time.

Now that there is colour in the tree, I need to make it look more like a tree by linking a colour change to the aging of the tree. I want the trunk to go browner as the tree reaches maturity. Not the easiest thing in the world, but not the hardest either!

No comments:

Post a Comment