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

World Generation #36

Open
Snowiiii opened this issue Aug 19, 2024 · 6 comments
Open

World Generation #36

Snowiiii opened this issue Aug 19, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Snowiiii
Copy link
Member

Snowiiii commented Aug 19, 2024

This will be a fun one. I bet this will take longer than a week :c

Packets

Actual fun

Resources:

Random's

Mojang uses some own Random implementations.

  • XOROshiro128

  • XOROshiro48

  • Biome map
    It all starts with the so-called “biome map”: which serves as a template to dictate which type of biome goes in each region of the world. Plains, deserts, mountains and oceans are all examples of possible biomes, and nowadays the Overworld alone counts over 60 of them.

The map is built using a sequence of fairly simple operations, referred to as “layers”, which are stacked on top of each other. Each layer takes the biome map from the previous one, adds some details, and passes it to the next one.

image

Terrain:

  • Basic Outline
    The first one creates a basic outline, using the biome map to decide the height each region can have. The result is a solid, barren landscape, entirely made out of stone, where every empty block below y=62 is turned into water.

  • Biome's
    The following step replaces all the surface stone blocks with a type appropriate to their biome. Grass for plains, sand for desert, gravel for oceans, and so on. This is also where the bedrock layer is generated. Interestingly enough, in the Java Edition its pattern doesn’t depend on the world seed, and is the same across every Minecraft world.

  • Caves's
    In the third step, caves and ravines are literally carved out of stone.

image

Finally, the third phase populates the world with the remaining features. Structures like villages, strongholds and ocean monuments are placed first, followed by decorative elements like trees and grass. This is also when ore veins are added in the world, in a process not dissimilar to the ones used by “Infiniminer”.

image

Biomes

Resources:

Overworld

Offland biomes (islands/oceans)

Highland biomes

Woodland biomes

Wetland biomes

Flatland biomes

Arid-land biomes(it neither rains nor snows at all, but the sky still turns overcast during inclement weather.)

Cave biomes(oh hell they exist as well :c)

Void biomes

Nether (hell (literally) it does not end)

The End (this game is endless)

Structurs

Resources:
https://minecraft.fandom.com/wiki/Structure

Overworld

Underground structures

Aboveground structures

Village

Abandoned Village

Aboveground and underground structures

Underwater structures

Nether

The End

End City

Structure-like features

mhh. maybe 2 weeks

@Snowiiii Snowiiii added this to Pumpkin Aug 12, 2024
@Snowiiii Snowiiii converted this from a draft issue Aug 19, 2024
@Snowiiii Snowiiii added the enhancement New feature or request label Aug 19, 2024
@Bryntet
Copy link
Contributor

Bryntet commented Aug 19, 2024

Idea, maybe a first start could be to implement superflat, we also should probably have an enum with the different world-gen options (noise, debug, superflat, normal)

@Snowiiii
Copy link
Member Author

Idea, maybe a first start could be to implement superflat, we also should probably have an enum with the different world-gen options (noise, debug, superflat, normal)

Good idea

@CoolSlimbo
Copy link

To add, slime chunks are also needed to be generated.

@NiLSPACE
Copy link

Another resource that could be useful : http://cuberite.xoft.cz/docs/Generator.html

It documents the way Cuberite's world generator works. I believe Feather also based their generator on it.

@roobscoob
Copy link

Idea, maybe a first start could be to implement superflat, we also should probably have an enum with the different world-gen options (noise, debug, superflat, normal)

Rather than an enum, you should probably create a WorldGenerator trait. You could create a SuperflatGenerator that implements WorldGenerator. This makes it super easy for third-parties to implement their own generators.

@Snowiiii
Copy link
Member Author

Idea, maybe a first start could be to implement superflat, we also should probably have an enum with the different world-gen options (noise, debug, superflat, normal)

Rather than an enum, you should probably create a WorldGenerator trait. You could create a SuperflatGenerator that implements WorldGenerator. This makes it super easy for third-parties to implement their own generators.

Hey, I think this is actual what we are ended doing now

@Snowiiii Snowiiii pinned this issue Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants