Comment by ajuc
5 years ago
> My guess is if this extended to multiple (levels / maps / ?) you'd probably split the settings into multiple functions, one per map right...?
This was handling ui dependencies for https://ajuc.github.io/outdoorsBattlemapGenerator/
Basically I wanted to redraw as little as possible so I build a dependency graph.
But then I wanted to add more parameters and to group them, so I can have many different kinds of trees without hardcoding their parameters. It was mostly an UI problem, not a refactor problem. So I'm rewriting it like this:
https://ajuc.github.io/kartograf/
Graph editor keeps my dependencies for me, and user can copy-paste 20 different kinds of trees and play with their parameters independently. And I don't need to write any code - a library handles it for me :)
Also now i can add interpolate node which takes 2 configurations and a number and interpolates the result between them. So I can have high grass go smoothly to low grass while trees go from one kind to another.
No comments yet
Contribute on Hacker News ↗