Terasology / TutorialAssetSystem

1 stars 7 forks source link

Add tutorial chapter for managing per-block extra data #5

Open Cervator opened 6 years ago

Cervator commented 6 years ago

With the module FlowingLiquids went a new per-block extra data system in the engine, see https://github.com/MovingBlocks/Terasology/pull/3476

We should write a tutorial chapter on how to use this to accomplish something like FlowingLiquids and maybe a few other example ideas in passing.

4Denthusiast commented 6 years ago

What FlowingLiquids does is complicated additionally by it using custom BlockMeshGenerators. In order for an example to be suitably simple for a tutorial, the example probably shouldn't have that, which implies that block rendering wouldn't depend on the extraData field (although that would be nice, so you could see what was going on). Perhaps a block that produces other blocks around itself, but only a limited number of times (counted by extraData) would be suitable. Something less obscure and pointless-looking would be nice, but I suppose there's a tradeoff between simplicity to implement and actual niceness of the feature.

It would also be good for this tutorial section to mention other ways of achieving the same thing (e.g. block families, block entities) and when each approach is appropriate.

4Denthusiast commented 6 years ago

Another example system idea: Make blocks over a certain hardness threshold not be destroyed on the first try, but increment a counter each time they would be destroyed, then allow it to be destroyed as normal after a few tries.

syntaxi commented 6 years ago

I think that the issue here is to find a balance between using an entity and using this. One thing we should also definitely include is some guidelines on when to use this, and when not to use it.