Rebmiami / Territect

Terrain generation script for The Powder Toy written in Lua
MIT License
3 stars 1 forks source link

[SUGGESTION] Pass loop #27

Open z4dg opened 1 year ago

z4dg commented 1 year ago

Is your feature request related to a problem? Please describe. Sometimes you need an infinite generation for decorative purposes like rain or snow . Or just for re-generation and if the result is good you just copy it and break the loop .

Describe the solution you'd like You can mark 1 pass with Loop start and 1 pass with Loop end , as generator gets to Loop end , after drawing this pass it will draw Loop start pass and go on again and again . There should be a button to break loop (appears in one of edges of screen?)

Describe alternatives you've considered Re-generate in settings so it generates automatically after lets say 3 seconds but it will work only for re-generation

Additional context None

Rebmiami commented 1 year ago

Infinite generation seems like it might be pretty problematic to implement. I'd be better off improving the existing tools to make an addition like that unnecessary (such as ability to deco parts black to hide rain-generating CLNE and make it easier to distribute it evenly, such as how one of your previous issues suggested).

The idea of a limited-number loop is something I find more interesting and might consider adding. Looping passes would require some significant interface changes to implement, but I think that implementing something like that using layers (i.e. new layer type that generates the previous X layers again, accounting for the height of previous layers) would be simple and worthwhile as I sometimes find myself repeating the same layers over and over again like in Hellscape v2.

Re-generation (which I assume means discarding the results of the current pass and generating it again while leaving previous ones intact) would actually be a really good debug feature. I have plans for a dedicated debug mode that will allow you to view what's happening on a layer-by-layer basis, but I hadn't previously considered adding the ability to undo generation steps.