DSL for time- and space-varying display attributes #2176
Labels
L-World DSL
World description language
Z-Developer Experience
This issue seeks to make life easier for developers writing Scenarios or other Swarm code.
Z-Feature
A new feature to be added to the game.
Currently, our hack for producing visual variation within a swath of homogeneous entities is to inject a different entity with slightly different display attributes among the rest. For example, a "wavy water" entity within a body of "water".
Our current DSL has sufficed so far in the following cases:
However, there are also occasions in which we want indistinguishable behavior between visual variants. It's also just good engineering practice to separate concerns of "presentation" from "logic".
For a given terrain or entity, we could have a DSL that maps coordinates to predefined attributes. The existing DSL should suffice for this; it would simply operate on the domain of "attr" rather than "terrain/entity". Perhaps it is as easy as swapping a type parameter.
As an extension, in addition to
x
andy
, it would be cool to add the "wall-clock time"t
to the DSL to support animations. This could be used for wave crests that rise and subside, or to simulate pulsing, glowing lava fields.The text was updated successfully, but these errors were encountered: