Orchards and tree generation

For a long time I’ve been neglecting the orchards in the game. Only apples could be grown in them, and the art for them was mediocre. While this was ok, the townspeople in the game like variety in food, and just apples wasn’t making them happy, especially if there were no wild berries in the forest to collect.



So this week I added the new art required for having larger variety in the orchards. This is a somewhat tedious for each tree type. For performance reasons I can’t model every branch and leaf, which in some ways I think would be easier than generating low poly trees.



I have to make a lot of different resources to get the these trees into the game and usable in orchards. There’s the model itself, which has solid parts for trunks and main branches, textures on billboards for the finer branches, textures for the leaves, textures for ambient occlusion, a model representing the fruit when it’s harvested or moved from storage, and textures for that. Then there are sprites and text strings representing the fruit and seeds so that it can be shown in the user interface. Then there’s a whole bunch of data to configure. The tree needs to be setup as a growable item, configured to grow fruit dependent on temperature, and then tied into the game. Then the actual item that townspeople can use and eat needs to be configured as well.



Once it’s in game I generally tweak the artwork until I’m happy with it. Auto-detecting file changes and reloading resources is awesome for this. If you’re making a game, I highly recommend using a tool set that does this to reduce iteration time.

In the end, I have all these nice trees that hopefully look like pruned fruit trees in an orchard.



Maybe one day when I have nothing else to do I’ll write a tool to make the trees and textures for me, but writing a system like that would probably take more than the 8 hours or so of art and setup time it took to make these.



Before you yell at me, yes, I know there are tree generators out there, but my trees are very low poly and use custom shaders and model formats to expand billboards on the GPU and handle removing leaves in winter. I’m also one of those weird programmers that likes to write everything myself. 🙂