Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced World Generation #78

Open
BenCheung0422 opened this issue Jan 7, 2025 · 0 comments
Open

Enhanced World Generation #78

BenCheung0422 opened this issue Jan 7, 2025 · 0 comments

Comments

@BenCheung0422
Copy link
Member

BenCheung0422 commented Jan 7, 2025

Original: MinicraftPlus/minicraft-plus-revived#420, MinicraftPlus/minicraft-plus-revived#715, MinicraftPlus/minicraft-plus-revived#717
Supersedes: #38

The new system should be enough scalable and highly customizable with many more options and functions. There would be default sets of generators and highly customized generators. There would not be half-generated chunks.

Dimensions

Worlds are based on Dimensions, where each contains a certain collection of world objects and content. For default gameplay, there would be only one dimension, Overworld. There would also be a possibility of Empty Dimension as defined in the generator. In general, the generator settings are isolated from each other for each dimension. There could still be an integrated generator based on generated parts by the Dimension Generators, taking the content into account, performing overall generations.

The definitions for each dimension are defined as Dimension Definitions. The default Dimension, Overworld, would still be accessible and could be overridden by the custom definitions.

Noise Parameters

The set of noise generators, associated with defined keys, which allow 0-9a-z_ and may contain dots as delimiters. The produced values are stored as arrays in world for the generator. Different types of noise functions could be used, along with some processing functions. However, seed generator function, the function producing seeds for the noise functions, is not customizable, and the array types must match with the accessing functions defined by the generator parameters.

Available gradient noise algorithms: 2D Perlin/Simplex/OpenSimplex/SuperSimplex, 3D Perlin/Simplex/OpenSimplex/SuperSimplex, 4D Simplex/OpenSimplex.

Available functions for all these parameters may refer to Minecraft's density functions.

Generator Parameters

The parameters are defined per dimension and customizable with custom identifiers. The default set of parameters: temperature, humidity, continentalness, erosion, weirdness, depth and density.

Categories are decided by the values for each parameter, and categories could overlap each other. The configuration for the Categories are just the numeric ranges with exclusion and inclusion. Allowed characters are 0-9a-z_, so pure numbers are also accepted. Namespace is optional.

To simplify the process, the accessing functions to the noise parameters would be allowed only here, so the required ranges of noise data could be predicted and generated as desired. The transformation of index would allow only addition, subtraction, multiplication and division, but should be ensured to be injective. Most likely, value reference function to the index would only be accessible once only, i.e. mostly linear function.

Temperature

Used only in biome generation. This part may be reconsidered when the weather system is considered. Divided as levels.

Humidity

Used only in biome generation. This part may be reconsidered when the weather system is considered. Divided as levels.

Continentalness

Used in biome generation and would affect terrain generation. Deciding between ocean, beach and lands.

Erosion

Used in biome and terrain generation. Divided as levels.

Weirdness

Used in deciding biome variations. May not apply to all biomes. Divided as levels.

Height

Simple conversion from a y-coordinate to a numeric value. Used in biome and terrain generation.

  • 1: > certain positive value
  • 0: about the sea level
  • -1: below the sea level
  • -2: etc.

Elevations

Between valleys, low, mid, high and peaks. Used in terrain generation.

Subelevations

Basically Elevations but depressed from the peaks. This is useful for elevations of sea floor, where peaks are likely faded.

Density

Used in terrain generation. May depend on other parameters.

Biomes

Set on each tile on each layer. Decided by the above parameters.

Biomes would not be based on the existence tiles (calculation complexity is too high). However, certain mechanisms to change biomes would be allowed, and could be by some magic setups or technology or something, like a biome transformer or something.

Default Biomes

Available default biomes:

  • Ocean:
    • Ocean
    • Deep Ocean
    • Warm Ocean
    • Lukewarm Ocean
    • Deep Lukewarm Ocean
    • Cold Ocean
    • Deep Cold Ocean
    • Frozen Ocean
    • Deep Frozen Ocean
    • Deep Warm Ocean
  • Highland:
    • Jagged Peaks
    • Frozen Peaks
    • Stony Peaks
    • Meadow
    • Grove
    • Snowy Slopes
    • Windswept Hills
    • Windswept Gravelly Hills
    • Windswept Forest
  • Woodland:
    • Forest
    • Flower Forest
    • Taiga
    • Old Growth Pine Taiga
    • Old Growth Spruce Taiga
    • Snowy Taiga
    • Birch Forest
    • Old Growth Birch Forest
    • Dark Forest
    • Pale Garden
    • Jungle
    • Sparse Jungle
    • Bamboo Jungle
  • Wetland:
    • River
    • Frozen River
    • Swamp
    • Mangrove Swamp
    • Beach
    • Snowy Beach
    • Stony Shore
  • Flatland:
    • Plains
    • Sunflower Plains
    • Snowy Plains
    • Ice Spikes
  • Arid-land:
    • Desert
    • Savanna
    • Savanna Plateau
    • Windswept Savanna
  • Cave:
    • Caves
    • Lush Caves
    • Dripstone Caves
  • Void:
    • Void
  • Nether:
    • Nether Wastes

Outside the y-coordinates, biomes are undefined.

Terrains

Terrains are another attributes than biomes. Available default terrains:

  • Hills
  • Plains
  • Peaks
  • Cliffs (may be Shore)
  • Plateau
  • Mountain

Similar to biomes, those would also be saved for each column in each chunk.

Base terrains are then decided by combining the above parameters (like continentalness, erosion and elevations) with the Density, and biomes and terrains. And the tiles are either solid or air at this stage.

Processors

Each set of functions decides a certain behavior to change the terrains by the above parameters and the decided biomes and terrains. This controls all replacements, including air, fluids and ore veins. Also, "surface" and "carvers" would also be included.

Structures

The structures would be placed according to the conditions given. Several functions like distance calculations and tile position references (either constants or configured by other functions) would be available. The placement of structure content may also depend on the targeted tile, like whether air or not, as the conditions, giving out the probabilities of placements (integrity). There would be sets of structures for definitions, and may allow detailed configurations for the subsets. For the loot chests, there could be permutations and combinations if any.

It is quite a lack of enough structures, including decorative and storytelling structures, like underground remains, forest remains, etc.

Under structures, there would be jigsaws, which could generate independently and eventually attach to the large structure. The references points would just store the point for the whole structure but no any single jigsaw. Jigsaws are used only during the generation of structures.

Features

Features do not directly depend on structures and other features, but the biomes and tiles, as well as the parameters. This includes lakes, small ore blobs, and those which occur relatively more frequent than structures.

Default Generators

A configured and set generator configurations used and adapted on the world would be directly stored in the world save, so if modifications to the generator configurations are required, only those in the world save would be effective immediately, but not those in the Packs. Also, Packs could define some parameters to be set by players on the world create menu.

World Create Menu

An option of "World Type" would be included. This option may be in a separate tab or something, but if there are customizable parameters available, the corresponding buttons or options would be appear under the option.

World Types

Available options by default gameplay would be (all are infinite):

  • Default: a general random world with some structures, biomes and terrains, without any customization or special feature.
  • Islands: a world with many islands, generally without a large land biome. Customizable by the land sizes.
  • Mountain: a world with a whole large land with many mountains and sometimes lakes and rivers but no ocean. Customizable by the frequencies and sizes of mountains, lakes and rivers.
  • Plain: a world with a whole large land without mountains and oceans. Customizable by the frequencies and sizes of lakes and rivers.
  • Box: a world with sharp rectangular edges. Customable by the size of the world, and the part outside the edges, either void, oceans, plain water (no floor), high walls (one kind of tile only).
  • Superflat: refer to Minecraft
  • Large Biomes: a world like Default but the sizes of biomes are larger. No customization.
  • Single Biome: a world with only one biome. Customizable by the mandatory biome choice (with a button of "Random" to help choosing).

Customization preferences are not saved in game preferences, but the resultant configurations for the world generator would be saved in the world saves.

Levels

There would be no real "levels" anymore, but instead it refers to the concept of separated world generation configurations along the heights.

Sky Level

This level would be redefined. Likely, this level would like be another dimension, that conceptually placed above the weather section of Overworld, thus no raining or other weathers. Maybe some special implementations would be done other than Minicraft's one, like The Aether. And there might be a feature that some cloud tiles would be regenerated after mining, or moving tiles along time. Also, there could be some structures on the cloud and the cloud tiles should be generated less connected but in stacks.

Surface Level

Many different activities would occur on the surface in the vanilla gameplay. The structures, terrains and biomes affect a lot the appearance of the surface.

Underground Levels

There would be more caves like in Minecraft, the different cave shapes. There could also be some structures underground and cave biomes. The distributions of ore veins, lava, rock variants, etc. would likely be topic as it depends on what ores we would eventually have in the vanilla gameplay.

Perhaps there would be some variants of cave biomes, but the Deep Dark, but in a different taste. A vegetated cave is also an interesting idea.

Ocean Level

Player would be able to swim and dive, so they could see things underwater (poor vision if not enhanced). Other than this, like the Aqua Update, it is a good idea to have a variety of aquatic lives and tiles. Maybe there could be volcanos.

Biodiversity

To enhance the abundance of game content, biodiversity is one of the feature that could be improved by world generation. This includes tree and flower variants. Also, variants should not only just be visuals but also the materials, the actual mechanological content. For visual variety, some shape variants for some plants and trees may be possible by tile states set by randomness; the another way would be using animations over static sprites.

Randomness Reproducibility

The whole generation process starts with the world seed. Then, the world configurations and details are decided. After that, they are the chunks, for the primary world content. One thing to note that a chunk may be spawned regardless of the previously chunk, in other words, without a definite order, so the order-independence of the chunk generation algorithm is essential to this section. This includes using the same deterministic algorithm that is consistent for different directions, on the same chunk.

Also, a generator seed for all the noise parameters used by all chunk generations would be generated by the world seed.

See Also

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