Skip to main content

Command Palette

Search for a command to run...

Machi - Branch Growth

Published
1 min read
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.

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 🐛