Saturday, May 21, 2011

More screenies

So, people wanted to see more screenshots! Let's take a look at the first two steps of the terrain generator:


The first step uses 2-D perlin noise to generate a height map. Nothing fancy.


The second step mi-... WHAT.

*fixes bug*


The second step mixes in 3-D perlin noise in some places. (This whole "in some places" bit will be fleshed out later into a nice, flexible biome system). The general shape of the terrain is still the same as in the first picture, though.

3-D Perlin noise is, simply put, a function that takes an x,y,z position as its input, and returns a value beween -1.0 and 1.0. It is a bit like measuring the temperature at a given point. For two positions that are right next to eachother, the returned values will be almost the same. But two points far apart will return completely unrelated values. This value is multiplied by some factor, 30 in this case.

Once we have this value, we subtract the relative height of that point to the surface that was generated in step 1.  If the result is positive, a block of grass or dirt is placed. If not, it's air.  The end result is some weird craggy terrain, and some floating boulders.

The same valley, seen from the other side:



And some steeper terrain, while we're at it.



5 comments:

  1. Ah, a whole new post with screens, thanks. Makes me wanna start building and exploring right away.
    How private a project is this, if I may ask? Is there going to be some playable release sometime in the future, is it going to be for your portfolio only or what are your plans?

    ReplyDelete
  2. There is some source code available (http://bazaar.launchpad.net/~nocte/hexahedra/trunk/files), but I don't recommend using it just yet. The plan is to get a very basic, but solid engine out first, with clean code and some documentation. After that, everybody is free to toy with it, and I'll continue developing into an actual game. (Games? I'd like to start with some kind of Tower Defense, but I have several ideas.)

    ReplyDelete
  3. Ah, ok. Guess I just have to keep stopping by and check for new updates. Good luck then with the future developement. :)

    ReplyDelete
  4. Hi, this looks very great and impressive, because I really hate the height-/viewlimit in Minecraft.
    But is there a way to bring some of this features into Minecraft? Like a worldgenerator or a mod which creates epic landscapes with no 128-block-height limit, this great lightning and this view distance?
    Or do we have to use a completely new game based on this new engine to use your work?
    And is there a downloadable client, which you can use to walk around in a map created by our engine?
    Would be very nice if you tell me more about this, because your screenshots look epic! :D

    ReplyDelete
  5. @Battlefreak2
    It should be possible to extend the height limit in Minecraft. yMod already did this, although it hasn't been updated since 1.2. There was also another mod in development that uses cube chunks (just like Hexahedra), but the programmer also got frustrated with updates breaking his work. The upcoming access to MC's source code will be a real boon!

    There is no downloadable client yet (or a server, for that matter). I recently attempted to build it with Visual Studio 2010, but after setting up a virtual machine and installing/building the dependencies, I discovered Microsoft's compiler does not support all the newest C++ features yet. Aaargh! I'm not sure whether to set up everything again for gcc, or to wait for MS to update the compiler.... Oh well, in the meantime I'll work hard to get everything ready for a first release of the library itself.

    ReplyDelete