A procedural and customizable tree generator for the TIC80 fantasy computer.
- Can be run in the web player here
- Also available on itch https://archaicvirus.itch.io/procedural-tree-generator
- See the releases page for native windows, mac, linux, and html versions. *html version has some bugs being worked on, avoid using for now
- Trunk Width
- Trunk Height
- Step Height
- Shift/Step
- Sprite Id
- Branch Length
- Branch Width
- Branch Thickness
- Branch Height
- Branch Shift
- Total Branches
- Branch Deviation
- Leaf Density
- Leaf Cull Distance
- Leaf Fill Radius
- Leaf Fill Count
- Vine Count
- Fruit ID
- Fruit Density
- Save Width & Height
- Save X & Y
- Save ID
- Background Color
The width in pixels of the main trunk
The total height of the combined trunk segments
The height in pixels of each vertical trunk segment (Does not affect overall height)
The random horizontal deviation in pixels, to shift each trunk segment as it 'grows' upwards
Trunk & Branch texture. The sprite id used for the mesh fill algorithm
- Sprite id's 0-15 (the top row of tiles) can be selected to change the tree's texture. These can be customized in the sprite editor to your liking
The average length in pixels of each branch
The width in pixels of each branch segment as the branch grows outwards
The height in pixels of each horizontal branch segment, as the segments 'grow' outwards
The height (in number of trunk segments), to snap branches to the nearest vertex of the main trunk
The random range in pixels that the branches are allowed to shift upwards at each growth step in the generation process, (lower values lead to straighter branches)
The total amount of branches to spawn (distributed evenly between the left and right of the trunk)
The relative offset between branches, scaled based on the number of branches and offset by the branch height parameter
The average chance that leaves will spawn. Leaves are spawned starting from the tip of each branch, snapped to branch vertices, going towards the trunk
The distance (in number of branch segments) from the tip of each branch toward the tree's trunk, to limit leaf drawing
The radius in pixels to randomly spread leaves (separate from leaf generation on branches). Always locked to the top of the tree trunk
The total amount of tries to randomly distribute leaves within the fill radius
The total amount of vines to spawn. Vines are spawned by picking vertices of two randomly selected branch segments and have a random 'sag' amount to vary the look
The sprite id to use for the layer of fruits/flowers. These are spawned using the same leaf-spawn method for the branches. In the sprite editor, sprite id's 32 - 47 are used for this layer - the third row.
Average chance to spawn fruits/flowers
In pixels, the rectangular area of SCREEN RAM
to copy to SPRITE RAM
using MEMCPY
The top-left corner of the rectangular area to copy & save.
Ranged 0 - 511 - The tile/sprite id to paste the copied rectangle. Keep in mind if the id is positioned near the border in the sprite editor, the copied tiles won't retain their original order
The current background color (for transparency reasons) - will be copied as the background when saving the tree