World Generation ? YES !!!!

So i want to how people deal with world gen in java so i was thinking why don’t we make some demo to show our
work in this field.

That is my project and my first time trying to generate world. But this is only one chunk
DOWLOAD : http://www.mediafire.com/download/ul8lmxi5s1u9m1o/Nothingess.jar
I can’t wait to see your work :smiley: :smiley: :smiley:

update v0.1 :
-grass spreads
-Generation of 1 chunk

Great, this is my version, it still needs a lot of terrain types and tweaking.

Currently there are 3 layers (grass, dirt, rock) with the grass and dirt with random thickness.
After an certain threshold there is only rock (with resources).

Dug down a little (there seems to be a lot of resources stacked tougether here, this is just luck):

Fully underground (in a big random cave):

Destruction is per pixel and is really fast thanks to the quad tree and some smart shader code:
Materials even blend into eachother with an selective - blurring shader :smiley:

All this stuff is generated with simplex noise.

The layers are calculated like this (grass as example):
val is the height of the terrain, this add more chance for grass to grow on top, and decreases this chance lineary with the y coordinate.


float grass = Math.max(3, SimpleMath.fastAbs(gen2.noise((x+px)*0.001f, (y+py)*0.001f, 0, 5, 3, 0.5f))*10) - 0.12f * Math.max(10, y + py - val);
m = grass <= 0 ? TerrainMaterial.DIRT : TerrainMaterial.GRASS;

Gold gets generated as little to very little specs (> 0.9) values of the noise.
Iron veins are generated as lines (-0.1 - 0.1) values of the noise.

Terrain is infinite in all directions, you can keep walking forever ( and without lag now :smiley: )
Sorry no demo yet, it is not ready for wip :slight_smile:

It is playable, but really boring, and the player model is not right.
(i could make a whole post about my player model, wich is also generated with only code (my own cilinder algorithm), and yes its fully 3D).

If you have any questions, feel free to ask.

Mockup of virtual city (requirement was that all roads must be axis aligned)


https://indiespot.net/files/temp/battledroid/mapgen-04.png


https://indiespot.net/files/temp/battledroid/mapgen-06.png

Cool :smiley: what libs do you use i dont use any :smiley:

Java2D :point:

Me LWJGL

City looks awesome :smiley:

cool 8)

That looks friggin awesome! :point:

Some time back I was playing with a terrain system. The idea was to just define the terrain type of a tile/area and let the computer generate a terrain from that.
I would give each terrain type a texture and an instruction path how to build a heightmap out of noise. The algorithm would then generated transtitions between different terrain types automaticly.

The project was left unfinished as many other ^^

I found an old build of the app(screen1) in which one could define a terrain heighmap. Only windows libs are included and I don’t really know if it runs.
http://www.java-gaming.org/user-generated-content/members/63064/terragen-there-is-a-inside.jar

ps: riven your images arn’t displayed for me :frowning: