Jump to content
  • entries
    15
  • comments
    52
  • views
    6097

Zone generation

thecheeselover

1435 views

Subscribe to our subreddit to get all the updates from the team!

I have integrated the zone separation with my implementation of the Marching Cubes algorithm. Now I have been working on zone generation.

A level is separated in the following way :

  1. Shrink the zone map to exactly fit an integer number of Chunk2Ds, which are of 32² m².
  2. For each Chunk2D, analyse all zones inside its boundaries and determine all possible heights for Chunk3Ds, which are of 32³ m³. Imagine this as a three dimensional array as an hash map : we are trying to figure out all keys for Chunk3Ds for a given Chunk2D.
  3. Create and generate a Chunk3D for each height found.
  4. Execute the Marching Cubes algorithm to assemble the geometry for each Chunk3D.

 

In our game, we want levels to look like and feel like a certain world. The first world we are creating is the savanna. Even though each Chunk3D is generated using 3D noise, I made a noise module to map 3D noises into the 2D to able to apply 2D perturbation to the terrain.

image.thumb.png.dabfc74065279611beab5f09c82c5ebd.png

5a8d9e3977e7f_Jdk-9.0.1Screenshot2018_02.21-11_27_44_36.thumb.png.e546c2bba66ca8e483a2406a92f2fee2.png

 

I also tried some funkier procedural noises : 

5a8da258f37cf_Jdk-9.0.1Screenshot2018_02.21-11_44_58_06.thumb.png.e7131ac55bc1980312779cc7b71187aa.png

An arch!

5a8da263044bf_Jdk-9.0.1Screenshot2018_02.21-11_45_15_28.thumb.png.d3baa9a1a385c9229dd1d8ee246f9783.png

5a8da26e86f17_Jdk-9.0.1Screenshot2018_02.21-11_45_20_30.thumb.png.1b2de9b36b1dac32988d481b1199a3d9.png

5a8da2750c771_Jdk-9.0.1Screenshot2018_02.21-11_45_33_61.thumb.png.b6f3a60564e5f2d8a0cf4c4298148537.png

5a8da27b6f980_Jdk-9.0.1Screenshot2018_02.21-11_45_42_05.thumb.png.6b76ffd7a92919eb31abc605e8757e36.png

 

The important thing with procedural generation, it's to have a certain level of control over it. With the new zone division system, I have achieved a minimum on that path for my game.



1 Comment


Recommended Comments

I don't have much specific to say, but I just wanted to quickly comment that I've been finding these entries interesting, keep up the good work! :)

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By phil67rpg
      well I am able to get my sprites to rotate and move in all directions, I have drawn two plane sprites, I am also able to shoot a bullet in the up direction, I want to shoot bullets in all directions just like my plane rotates, I just need a hint on how to proceed, go easy on me this is new stuff to me. However I am making progress.
    • By jonwil
      We have an engine based on Direct3D11 that uses ID3D11Device::CreateTexture2D to create its textures passing in whatever format we read from the dds file header.
      We also have a previous version of our engine that uses the DX9 fixed function bump map feature for bump maps. This feature takes bump map textures in U8V8 format as input but it also takes textures in DXT5 and A8R8G8B8 and converts them into U8V8 using D3DXCreateTextureFromFileInMemoryEx in d3dx9).
      Our current D3D11 engine handles the U8V8 textures just fine (I think it feeds it to CreateTexture2D as DXGI_FORMAT_R8G8_TYPELESS) and has some shader code that emulates the fixed function bump map feature without problems. But now we want to add support for the DXT5 and A8R8G8B8 bump maps.
      Does anyone know where I can find code for Direct3D11 (or just plain code with no dependence on specific graphics APIs) that can convert the DXT5 or A8R8G8B8 texture data into U8V8 data in the same way as D3DXCreateTextureFromFileInMemoryEx and the other D3DX9 functions would do? (Someone out there must have written some code to convert between different texture formats I am sure, I just can't find it)
    • By iGrfx
      I've learned that the triangle clipping in the rasterization process usually using Sutherland–Hodgman algorithm. I also found an algorithm called "Guard-band". I'm writing a software raster so I want to know what technical the GPU use, I want to implement it for study. Thanks!
      updated: what's the more proper triangulate algorithm?
    • By Sword7
      I got a book called "High Dynamic Range Imaging" (published by Elsevier) and read some pages.  I learned that HDR requires deep color depth (10/12-bit color depth). 
      I heard that many vendors and independent developers implemented HDR features into their games and applications because UHD standard requires deep color depth (HDR) to eliminate noticeable color-banding.  I had seen color banding on SDR displays and want to get rid of it.
      I googled HDR for OpenGL but learned that they require Quadro or FireGL cards to support that.  How do they get HDR working on consumer video cards?
      That's why I want HDR implementation for my OpenGL programs.
      Tim
    • By phil67rpg
      well I have managed to get a plane sprite to move around the screen I want to know what to add to my game. I hope this question is appropriate.
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!