# Machi - Branch Growth

This documents the initial trial at growing branches.

In this initial version, branches grow outward. There is no energy, termination mechanic. It will just grow outward towards a direction.

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/b6538c81-f3f2-46a2-abf7-e6bc3bf3cb00.webp align="center")

You might say this doesn't look realistic at all. However, it is important to model the trees with straight branch growth if we want the trees to grow big.

## How it's done?

Branch texture will contain:

*   R: 255 if occupied else 0
    
*   G: direction where TOP is 0, RIGHT is 63 …
    
*   B: Bresenham-style error accumulator
    
*   A: Unused.
    

Then at each iteration, we identify which air cell can turn into branch cell given above values.

## What's Next?

Next task is to make it so that it branches out at random.

Sprited Dev 🐛
