Vegetation common asset organization

Josharias

Conjurer of Grimoires
Contributor
World
SpecOps
Hey all,

I was chatting with @Skaldarnar about how the plants and trees assets are mixed around alongside code systems. We were thinking to further separate the assets from the code systems in order to promote reuse.

Currently we have these modules which define assets and systems:
[Crops]
  • Blocks and tiles of different plants and the stages of growth
  • Provides integration with [ChangingBlocks] if it is enabled
[PlantPack]
  • Blocks and tiles for all the variety of trees
  • Overrides the [Crops] blocks to provide a different entity backings
  • Provides a system for planting seeds
  • Provides integration with [GrowingFlora] to generate blocks in a new world
[GrowingFlora]
  • Provides various systems for generating blocks in a new world and growing trees
  • Provides a mechanism for randomly selecting blocks in a chunk to trigger, in this case, plant growth
  • At the moment, is hard wired to [AnotherWorld] via biomes and a few other generic classes
I propose we reorganize some of these modules in order to separate the assets from the systems like this:
[Crops] -> merge into [PlantPack]
[PlantPack] -> extract the code systems into [AnotherWorldPlants]. Remove dependence on [AnotherWorld] and [GrowingFlora]
[GrowingFlora] -> refactor the biome and facet usage to be compatible with [Core] (I think both systems are mostly the same now, just needs tweaking I bet. Not sure which side needs the tweaking). Remove dependence on [AnotherWorld].
[AnotherWorld] -> move some reusable world gen goodies to a generally accessable place. (like
SparseObjectFacet3D<T> and ChanceRandomizer<T> for example)

This should hopefully allow all the GrowingFlora goodness to be useable in all sorts of world generation scenarios while maintaining the intent of AnotherWorld which is to be a "more like real life" world.

This would be the list of final modules:
[PlantPack]
[GrowingFlora]
[AnotherWorld]
[AnotherWorldPlants]

Thoughts? Other ideas?
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
First of all, pinging @Marcin Sciesinski and @msteiger .

The common place for world gen goodies might be [CommonWorld] which already holds some utilities for geometry, height maps, and so on. This would add a dependency to [AnotherWorld].

Overall I would like to have uniformly named asset modules for reusable resources. I think the *Pack suffix might be a good indicator for such asset modules, so [PlantPack] would go along with [AnimalPack], [CreaturePack], [InteriorPack], and so on. Alternatively we could stick to the *Resources suffix as in use for [StructuralResources], i.e., [PlantResources], [AnimalResources], ...

@Josharias I like your proposal for re-organizing the existing modules, that's basically what I had in mind in the first place. :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Sounds good to me :)

Just to add it in ChangingBlocks is weakly tied to Crops as when both are active the crops "grow" by simply changing through a set of phases. Not really a true growth system but wanted to mention it.

LASR then also has L&S plants but those are more purpose specific (and already in a fitting asset pack). There are also a few oddities in MoreLights, and I thought Hunger had a few plants once upon a time that replenished the player, but I don't see them now.

Finally there are the procedural plants, although I don't recall how far they work in TTA. Probably those should have their own sprite assets somewhere.
 
Top