Skip to content

archaicvirus/TreeGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TreeGenerator

TreeGenerator

A procedural and customizable tree generator for the TIC80 fantasy computer.

Settings

Trunk Width

The width in pixels of the main trunk

trunk_width

Trunk Height

The total height of the combined trunk segments

trunk_height

Step Height

The height in pixels of each vertical trunk segment (Does not affect overall height)

step_height

Shift/Step

The random horizontal deviation in pixels, to shift each trunk segment as it 'grows' upwards

shift-step

Sprite Id

Trunk & Branch texture. The sprite id used for the mesh fill algorithm

sprite_id

  • 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

sprite_ids

Branch Length

The average length in pixels of each branch

branch_length

Branch Width

The width in pixels of each branch segment as the branch grows outwards

branch_width

Branch Thickness

The height in pixels of each horizontal branch segment, as the segments 'grow' outwards

branch_thickness

Branch Height

The height (in number of trunk segments), to snap branches to the nearest vertex of the main trunk

branch_height

Branch Shift

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)

branch_shift

Total Branches

The total amount of branches to spawn (distributed evenly between the left and right of the trunk)

total_branches

Branch Deviation

The relative offset between branches, scaled based on the number of branches and offset by the branch height parameter

branch_deviation

Leaf Density

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

leaf_density

Leaf Cull Distance

The distance (in number of branch segments) from the tip of each branch toward the tree's trunk, to limit leaf drawing

leaf_cull_dist

Leaf Fill Radius

The radius in pixels to randomly spread leaves (separate from leaf generation on branches). Always locked to the top of the tree trunk

leaf_fill_radius

Leaf Fill Count

The total amount of tries to randomly distribute leaves within the fill radius

leaf_fill_count

Vine Count

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

vine_count

Fruit ID

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.

fruit_id

Fruit Density

Average chance to spawn fruits/flowers

fruit_density

Save Width & Height

In pixels, the rectangular area of SCREEN RAM to copy to SPRITE RAM using MEMCPY

save_width_height

Save X & Y

The top-left corner of the rectangular area to copy & save.

save_x_y

Save ID

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

save_id

Background Color

The current background color (for transparency reasons) - will be copied as the background when saving the tree

background_color