[HN Gopher] Procedural Worlds from Simple Tiles
___________________________________________________________________
Procedural Worlds from Simple Tiles
Author : airstrike
Score : 115 points
Date : 2022-01-09 18:39 UTC (4 hours ago)
(HTM) web link (ijdykeman.github.io)
(TXT) w3m dump (ijdykeman.github.io)
| ijdykeman wrote:
| Author here. It's awesome to see my post on hn! Happy to answer
| questions.
| movedx wrote:
| Amazing work.
|
| I'm not a very visually creative person. I want to be able to
| make virtual worlds but the assets are the problem for me. I
| think this will help alleviate that issue so thank you. Bought
| a copy.
|
| (I really want a little RPG about exploring.)
| programd wrote:
| Don' let that stop you! There are a ton of free assets both
| for Unity and Unreal. Check out e.g. the free category in the
| Unreal marketplace.
|
| https://www.unrealengine.com/marketplace/
|
| Search for the RPG category. There are whole RPG systems you
| can plug into Unreal which you can buy for laughably little
| money. (No affiliation, I just like what Epic is doing with
| the engine)
| movedx wrote:
| On another note https://generateworlds.com/ doesn't support
| HTTPS. If you need help getting a TLS certificate in place I'd
| be happy to help.
| ijdykeman wrote:
| Thanks! I _think_ I fixed it. Waiting on DNS.
| gaogao wrote:
| Did you use an constraint solver library like Z3 under the hood
| or roll your own?
| airstrike wrote:
| Came across the post on Google when searching (out of sheer
| curiosity) for algorithms for generating tiled wallpaper-like
| patterns (as in real world wallpapers and upholstery).
|
| This was a truly enjoyable read and such a well written article
| that I immediately thought others here would appreciate it, so
| thanks for writing it!
| zubspace wrote:
| This is really cool! Thanks for the article
|
| 1) Is it possible that the algorithm will fail to find a
| suitable tile and needs to restart?
|
| 2) I don't understand, why or how you get those rectangular
| ponds and lava areas in the first youtube video. I expected
| them to be far more organic or am I missing something?
|
| 3) How would do you ensure connectivity of areas or points of
| interest? Any ideas? Would you path a way before or after
| running the algorithm?
| lostdog wrote:
| Very cool idea, and the results look great.
|
| If I were using this practically, I would add a "fuzzer" to find
| intractable situations and add new tiles to fit them. You could
| even add a high cost to make certain tiles undesirable, so that
| the generator tries not to place them but can still use them to
| get unstuck.
| isoprophlex wrote:
| Very nice writeup, i find it always a pleasure to read stories
| from people explaining their journey towards designing an algo.
|
| TLDR: This is basically "wave function collapse" that was posted
| here as well some days ago, only it does local probability
| updates instead of global during tile resolving steps. This makes
| it run faster without sacrificing ability to halt, apparently.
| Very nice.
| mysterydip wrote:
| They look complex, but are they interesting? That seems to be the
| more difficult trick for any procedural algorithm I've seen to
| pull off. Although inherently subjective, anything that repeats
| too similarly too often, or doesn't logically make sense or have
| smooth transitions feels computer generated. The best procedural
| creation should feel hand-made IMHO.
| pfortuny wrote:
| Yes.
|
| They have no global design, so in essence they are meaningless
| because the only function of each tile is "to fill space",
| albeit in a "coherent" way.
| etherealmachine wrote:
| This is a great write up of the problem space. I've also tried an
| approach here that converted the tile dependencies into a Boolean
| constraint satisfaction problem and then used the Open Source
| clasp (https://potassco.org/clasp/) answer set solver to return
| valid tilings. The inspiration was from the paper "Answer Set
| Programming for Procedural Content Generation: A Design Space
| Approach" (https://adamsmith.as/papers/tciaig-asp4pcg.pdf) which
| is also a good read.
|
| Using an answer set solver was nice because it was so easy, I
| just had to encode the tile constraints and then the solver did
| all the work, backtracking, etc, but it could be slow, and it
| could also fail to return (infinite loop). I gave up because it
| seemed like WFC and similar could return results fast enough for
| "online" generation, like generating chunks in Minecraft and also
| because it seemed hard to encode tile probabilities (from some
| initial example map) like WFC does.
| hypertele-Xii wrote:
| The problem with this kind of algorithm is that it doesn't
| generate _worlds;_ It generates infinitely tiling neighborhoods
| of the smallest unit of space. It 's principally impossible to
| make a locally-infinite world _globally interesting._ There is no
| structure. It 's just _structured noise._ Fine for a bit of
| generative art, not so much for interactive game worlds.
| asiachick wrote:
| I agree with this so much. You're not likely going to get a God
| of War, Zelda, Uncharted, Last of US, or even GTA, Red Dead
| Redemption experience with a randomly generated world.
|
| On the other hand some games the game play itself is enough
| that randomly generated worlds are good enough? Rogue,
| Minecraft, Valheim, are a few that I've played.
| bhaak wrote:
| Why not both?
|
| Use a procedurally generated map as a template and enhance it
| with manually designed parts.
|
| Or mix and match manually designed tiles with procgen stuff.
| This is similar to to what OP's newer link describes.
|
| Another option is to develop a DSL that let's you describe
| the map in various degrees. "Put a random city there" vs "Put
| a city with these types of buildings there" vs "Put a city
| with a pawn shop at the northeast corner, an armor shop
| somewhere south, [...]".
|
| AAA games often use parts of this. For example for plants,
| many aren't put there manually by the designer but by
| randomized code and the designer just selects the area in
| which they should grow.
| programd wrote:
| Indeed. Check out the stellar work Joe Garth is doing with
| Brushify.io [1] for the Unreal engine. His procedural
| landscape placement tools let you create beautiful game
| terrains very quickly. Watch the videos on the site for
| what you can do - triple AAA visuals for very little
| effort.
|
| [1] https://www.brushify.io/
| k__ wrote:
| The Diablo series follows a hybrid approach.
| rendall wrote:
| Interesting. His follow up blog post _The Constrained Tile
| Placement Algorithm behind Generate Worlds_ (2019) seems like a
| refinement of the idea, and I found its explanation to be clearer
| https://ijdykeman.github.io/procedural_generation/2019/11/08...
___________________________________________________________________
(page generated 2022-01-09 23:00 UTC)