Skip to content

World generation #24

Open
Open

Description

@caelunshun

Roadmap:

This page will be a useful resource.

Activity

  1. added
    enhancement
    on Jul 28, 2019
  2. modified the milestones: 1.0, 0.7 on Aug 13, 2019
  3. aramperes commented on Aug 31, 2019

    @aramperes
    Contributor

    I think a first step would be to load the generatorName and generatorOptions fields from the level.dat file.

    Then, supporting basic super-flat generation using the layers in generatorOptions to set blocks in un-generated chunks wouldn't be too hard. Afterwards, we'd need basic decorators/populators for biome features like trees as defined in the options' structures.

    We'll need a perlin-noise library to support terrain generation in "default" world types, as well as implementing the biome grid/map layers. The logic for the latter could be based off Glowstone, which has near-parity with Vanilla (but only for 1.12).

    Larger structures like villages, caves, and strongholds will probably be later additions and be tracked in separate tickets when the time comes.

    At some point we'll also have to be able to generate a world from scratch (including the level.dat).

    Does this plan seem fair to you, @caelunshun?

  4. caelunshun commented on Aug 31, 2019

    @caelunshun
    MemberAuthor

    Seems reasonable to me. Superflat generation does seem like a good way to start, given its simplicity.

    I think generating a "bland" default world should be the next step—just simple use of Perlin noise to generate hilly variations. This would then lay the groundwork for biomes, caves, and such.

    https://github.com/jackmott/rust-simd-noise seems like a good noise library to use—its benchmarks show it to be over eight times faster than alternatives thanks to SIMD.

    I'll take a look at Glowstone's biome grid implementation to try to understand how that works. How to generate the variation between biomes has been my main concern regarding world generation.

    As for where to generate worlds: when the chunk worker is requested to load a chunk which does not exist, it should spawn a task on the rayon thread pool to generate it and have the task send the generated chunk through a channel when completed. This would be entirely asynchronous and multithreaded, which is ideal for performance.

  5. cheako commented on Sep 4, 2019

    @cheako
    Contributor

    I was thinking about looking for a save file. Links and meaning a repo would help.... someone could generate saves for a handful of seeds and post them... just make sure you inject some art into selecting the seeds. A website or application that generates saves would be better.

    I don't know much about MC other than I think I would like it, I just won't run MS applications.

  6. hansihe commented on Sep 4, 2019

    @hansihe

    I implemented the Minecraft worldgen in this crate a few years ago

    https://github.com/hansihe/voxel_worldgen

    It has most of the base features including biome support and cavegen. I don't really care that much about it anymore, so you have my permission to change the license/incorporate it in the project as long as I am credited.

  7. added a commit that references this issue on Sep 7, 2019
  8. modified the milestones: 0.7, 0.8 on May 20, 2020
  9. Tracreed commented on Sep 17, 2021

    @Tracreed
    Contributor

    Great resource for how certain things in the latest Minecraft update is achieved. A lot of talk about world generation.
    https://www.youtube.com/watch?v=TycBrFKEteU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions