Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
So you want to build a generator (programming) (galaxykate.com)
55 points by bryanrasmussen on May 25, 2021 | hide | past | favorite | 12 comments


From the title, I thought it would be about these generators: https://en.wikipedia.org/wiki/Generator_(computer_programmin...


Generation with constraints is a fairly common algorithm in combinatorics. When you need a set of objects with a particular structure, you could just make all possible examples and then filter out the unsuitable ones.

However if there are too many objects (matricies, graphs, etc) then this is inefficient. It is better to constrain the generation so that you 'prune' the tree of possible objects.


Me too. I think "data synthesis" is a better phrase if we're inventing jargon (contrast to "data analysis")


I'm making a generator of battlemaps for tabletop rpgs.

First version was this: https://ajuc.github.io/outdoorsBattlemapGenerator/

It has some nice features (for example exporting to virtual foundry vtt format .dd2vtt with colliders), but after a while I noticed that user interface is the biggest problem - I have a lot of knobs to play with and not enough space and user patience to explain them.

So I abandoned that and started making a new one: https://ajuc.github.io/kartograf/

This one has much less features right now (no water, stones, twigs, no constrains like "trees can't grow on each other", no export, etc), but it is built on a great graph editor library (litegraph) with nodes that you can join and combine. This should allow much better configurability once I get it to feature parity. UI is still pretty bad, I will try to encapsulate the submodules into subgraphs eventually and then I plan on adding the possibility of exporting generators as submodules which can be versioned and used by others - kinda like maven repo for generators. If I don't abandon it before that :)


I added the (programming) as I thought people might be confused into thinking the article would be about electrical generators and find themselves disappointed when clicking through.


The best term to describe this kind of generators is procedural content generation, or just PCG.


sure, but I didn't want to change the title a lot, just to prevent any wild and crazy misunderstandings.


Maybe `(graphics programming)` would be better, because I assumed it was for generator functions.


It's not only graphics, though. Kate Compton is well-known for creating Tracery https://github.com/galaxykate/tracery/tree/tracery2.


I knew enough to expect it was about programming, but in the other way: a code or program generator. This seems about art generation! Very interesting still.


I'd suggest:

> So you want to build a [procedural content] generator


well there's a couple suggestions on that line but my edit window seems to have passed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: