[WIP] [WGEN] BetterGen: The world generator that is better than you!

Discussion in 'WIP and Development Status' started by jtjj222, Sep 1, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    jtjj222

    This is the wip thread for bettergen. All status updates will be posted here.
    GitHub
     
    MrFigg, Courier and Icyene like this.
  2. Offline

    Courier

    Apparently biomes need to be more fractal than noise... heh

    My biome failure (open)
    [​IMG][​IMG]


    EDIT: BTW, default biomes look like this:
    Default biomes (open)
    [​IMG]
     
    jtjj222 likes this.
  3. Offline

    Courier

    I'm working on an implementation of midpoint displacement... it is like diamond-square without the diamonds. I thought it might be good enough since MC is very square based. We'll see once it's done :) (which should be later today).

    It still has a few bugs to work out... but here are my initial results with midpoint displacement. It is good for mountains.
    Screenshots (open)
    [​IMG][​IMG][​IMG]


    Ahg... it looks fine in game, but the map is actually very square based. Diamond-square is probably a better way to go. I will work on that tomorrow.
    Textured midpoint-displacement map (open)
    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 28, 2016
  4. Offline

    jtjj222

    I'm curious about how you did it, because I still can't get mine to work. Anyway, good work, and I can't wait to see how it turns out!
     
  5. Offline

    Courier

    Well, these algorithms are not exactly meant for an infinite map size, so that is the first problem. I generate the height map in very large sections. Right now it is 1024x1024 blocks, but the size can easily be changed to any power of two. The world has a base seed, and each 1024x1024 section has its own seed which is based solely off the world seed and the x and y of that section. This allows me to easily determine the seeds of neighboring sections, so I can generate the borders that will line up properly. First step is to generate all the walls, using the appropriate seed for each wall. Then I iteratively (because recursion is slower and pushes a lot to the stack) make smaller and smaller squares. In the end I have a byte[1024][1024] that is filled with height values for the entire section. This array is cached, so I don't have to regenerate the entire 1024x1024 grid for every single chunk. Right now the array is cached indefinitely, but it would be easy to implement some sort of clearing scheme.
     
    jtjj222 likes this.
  6. Offline

    Synaps3

    Hey Courier, how can you generate overhangs if everything is heightmap based?
     
  7. Offline

    Courier

    You can't. That is why not everything will be heightmap based :p. A heightmap is just the basic foundation.
     
  8. Offline

    jtjj222

    It appears to me (although I might be wrong), that you could use midpoint displacement in 3d with only a few simple modifications. Can you post your code thus far, so I can try modifying it to work in 3d?
     
  9. Offline

    Courier

    I need to fix a couple bugs first... right now, some of the walls don't line up. and when I change the size to anything other than 1024x1024, only the positive x positive y quadrant of the world generates properly...

    I want to fix those before it gets modified further.

    I don't quite understand how it could be modified for 3D, but that would be cool.
     
  10. Offline

    jtjj222

    codename_B how did you make the right-middle well? It looks cool.
    [​IMG]
    Also, Courier can you send the source for your awesome diamond-square code? Maybe a second pair of eyes will help :D

    I was thinking that we could have a 2d voronoi noise generator (I have already started on it) and the midpoint displacement generator for the base terrain, with perlin noise creating smaller features, and 3d simplex noise (we would have to be careful that it doesn't get too slow) for overhangs. I still don't know how we would make smooth biome transitions, so any suggestions would be great. This project is looking great so far!
     
  11. Offline

    Courier

    I haven't gotten back to the code for a while. It is more of square-square... there are no diamonds yet :p

    There is something wrong with the way I am seeding the random generator. The walls do not line up like they should, only some of the walls line up properly.

    I think these are the only three classes you need. Let me know if I forgot something.

    com.terriblysimple.wgen.SquareDiamond
    com.terriblysimple.wgen.TSChunk (Utility class)
    com.terriblysimple.wgen.square.SuperSector

    KNOWN ISSUES:
    -When the super-sector size is decreased (to 64, for example), only the positive-x positive-z quadrant generates properly. I haven't a clue why.
    -The edges of super-sectors do not line up properly.
    -Entire rows of super-sectors appear nearly identical... they must be getting the same seed somehow.
     
  12. Offline

    jtjj222

    Last edited by a moderator: May 28, 2016
  13. Offline

    Icyene

    I'm excited. If you guys go through with this, this will be phenomenal. Also Courier, how did you get those nice colored images showing (I believe) the different height levels?
     
  14. Offline

    Courier

    Those maps are actually of the biome type, not height. I generated them with a plugin I wrote called Cartographer. It can also generate hightmaps and many other types of map. Here is a link showing some of the maps it can generate. Other plugins can easily register new map types to it by providing a method to get a pixel color from a column of blocks. I haven't published it yet because I was hoping someone could help me add more built in map types and simplify the command structure. I'd gladly link you a copy if you want.
     
    Icyene and jtjj222 like this.
  15. Offline

    Icyene

    Courier Yes please! It looks really neat (and might make an awesome desktop background :D)
     
  16. Offline

    Raegenhere

  17. Offline

    jtjj222

    Just posting to say the project isn't dead :D
     
  18. Offline

    jtjj222

    Work in progress for the base terrain:
    Show Spoiler
    2013-01-27_22.14.25.png 2013-01-27_22.14.35.png

    Edit: I mean for really large features :D
     
  19. Offline

    jtjj222

    Any news? I can help work on this more over the summer.
     
  20. Offline

    jtjj222

    I'm going to be implementing a biome generator soon. I was thinking that we could create temperature/rainfall maps, and then use a Whittaker map to find the 'biomeness' of a region (i.e. a desert area near the edge of the biome would have a lower 'biomeness', and so it would have less dramatic features) to handle transitions. Any ideas codename_B Icyene Courier ?
     
  21. Offline

    Ultimate_n00b

    I would love to see this, though maybe a bit more natural? I do have to say, I do like where you guys are going.
     
  22. Offline

    Hoolean Retired Staff

    I wuv this soo much! Looks promising :)
     
  23. Offline

    jtjj222

    Why aren't you Mr Bluebear anymore?
     
  24. Offline

    Hoolean Retired Staff

    jtjj222

    Switching to something a bit more 'professional' and something that doesn't have stupidly placed numbers/capital letters ^_^
     
  25. Offline

    jtjj222

    Ah... Professionalism in a minecraft forum is hard to come by :D
     
    Hoolean likes this.
  26. Offline

    mncat77 Retired Staff

    Is this project still alive, the github repo looks like it hasn't had an update in a while? If so I'd like to help out where I can (summer vacation has begun for me finally, so I have time now, yay). Is there a list with all the features that are planned and how are biome going to be handled?
     

    Attached Files:

  27. Offline

    jtjj222

    I had cleaned it up a bit, and set it up with maven, but I forget where on my hd it is :(
    I'm not too sure if it's still alive or not. Perhaps it was too ambitious, and we never sustained momentum long enough? I'll still help if you want to continue it mncat77. I'd also love to see if codename_B and Courier are still interested :p
     
    mncat77 likes this.
  28. Offline

    EvilPeanut

    I'l help, add me on skype 'buddypeanut'.
     
  29. Offline

    mncat77 Retired Staff

    1.7 is out - about time to revive this thread!
    I haven't been very active, because school has been keeping me pretty busy (and osu! maybe xD) and I wanted to wait on 1.7 to come out to continue on this project, I have a week of vacation now and I'm gonna dedicate some time to this project pretty soon (don't even need to wait on the dev builds).
    As I'm probably going to scrap most of my code I have so far for this generator anyways I thought about whether not to replace the Bukkit WGEN API with reflecting a custom ChunkProviderGenerate into the world. What do you think?
    Pro's:
    • Faster (This is like the main reason)
    • Possibilty to set blocks with damage/metadata outside of BlockPopulators
    • Easy vanilla code import (e.g. Strongholds)
    • Can be mod without any changes (I don't know why you'd want that)
    Con's:
    • Could conflict with other WGEN plugins (I could just write a manager plugin though)
    • Scrap most of old code (was going to do that anyways)
    Edit:
    Also very important:
    We need a way to cache BiomeLayer/GenLayer results!
     
    jtjj222 and Ultimate_n00b like this.
  30. Offline

    jtjj222

    mncat77
    I worry about server stability with that approach. Perhaps instead, seeing as the wgen api is now deprecated, we can contribute to the new api, so that it meets our needs?
     
Thread Status:
Not open for further replies.

Share This Page