Better HN
topnewbestaskshowjobs
Log inSign up

marian42

31 karma · joined Nov 13, 2018 (8y ago) · 11 submissions

Submissions

comment 8y ago · link · parent

If you have two adjacent chunks, collapsing one will impose constraints on the other one. Even if the RNG part is deterministic, as you suggested, the result will be different depending on which chunk you collapse first.

comment 8y ago · link · parent

Each block has a probability of being selected. You could make this probability location dependent, for example by sampling a noise function. That way you get something like biomes.

comment 8y ago · link · parent

In the algorithm as it's described on that page, nothing is returned in case of a failure. I first implemented it so that single blocks would fail and a white cube would spawn at that position. Now, it uses backtracking. It keeps a history of its decisions and removes some whenever it reaches a contradiction.

comment 8y ago · link · parent

If you (or someone with a Mac) wants to create a build with the Unity Editor, I'll add it to the itch.io page.

comment 8y ago · link · parent

This is exacly it. Collapsing one area changes the possible blocks for nearby areas. If you use the same seed, you can still get different results by exploring places in a different order. Maybe there is a way to get around this though.

comment 8y ago · link · parent

My implementation keeps the entire world in memory, forever. This is obviously not desirable, but I didn't figure out a way around it. You can't generate a place again that you have been to because the result would be different.

If you do chunks and generate the edges first, you could run into a situation where it's impossible to fill the chunk based on it's edges.

For generating terrain, using noise functions makes a lot of sense since they are local (= don't need to know nearby values to evaluate) and deterministic.

comment 8y ago · link · parent

Since the algorithm is not deterministic I imagine it would be a nightmare to make all clients see the same world. But I agree it would be fun!

comment 8y ago · link · parent

I don't currently have access to a Vive, but I worked with it earlier. All that needs to be done is add SteamVR to the project and hook up teleportation. That's it.

comment 8y ago · link · parent

Yes, it does. However the algorithm is not deterministic. If you close the game and start it again, you will see a different world.

comment 8y ago · link · parent

You're right. There is backtracking in the demo and when it happens it looks quite eerie. The world around you just decides it wants to look different and changes.

comment 8y ago · link · parent

In my case, the probabilites for each block are supplied manually.