Add new rmgen DensityConstraint. Gives the ability to define how probable is to set something in a given position.
Useful for creating gradual tree density changes.
Differential D1639
Rmgen new type constraint DensityConstraint nani on Sep 22 2018, 2:13 AM. Authored by
Details
Add new rmgen DensityConstraint. Gives the ability to define how probable is to set something in a given position. Useful for creating gradual tree density changes. Used and tested in map Riverway: https://code.wildfiregames.com/D1632
Diff Detail
Event TimelineComment Actions This constraint is not deterministic since the random number is rolled in .allows. I also find the name of this constraint quite misleading for I would have guessed it calculates the density of something like the type of objects divided by the given area those objects are in (the density of those objects) and allows/denies weather it's within a density range given to this constraint. Comment Actions
I mean, if you paint two times in a row certainly you shouldn't expect the state to be stored from the previous paint job? One could arguably store the state on a singleton but I think this constraint achieves the purpose (I could imagine its application in a myriad of circumstances as-is).
If you think about probability density and that the end result (for a high enough sample size) achieves the purpose, I am not opposed to it. <strikethrough>All above said though, I don't like the idea of pulling library functions that are not used, to avoid code rot. If brought with a map (or changes to a map) that makes use of it then I'm all for it.</strikethrough> Comment Actions "I mean, if you paint two times in a row certainly you shouldn't expect the state to be stored from the previous paint job?" I agree. But a constraint returns a boolean value and should return the same when checked multiple times in a row. Comment Actions
That makes sense |