random procedual generation sugestions. (demo included)

D

Dengar

Guest
so everyone seems to be on this procedural gemeration bandwagon, so I finaly hopped on...and its pretty freakin kool.
this is my system I thought of and was just wanting thoughts and opinions. mostly cause im new to procedural generation. and I kno most ppl go with perlin noise which this is not.

how my system works:
it draws all tiles green.
then it draws cliffs. cliffs start at a random point and choose a direction to travel(right or left) then every movement itll decide if its going up,down, or straight with a higher chance of going straight and never having 3 rows of cliffs.
then it draws water. water starts at a random location and every movement it randomly chooses to move up,down,left, or right.
waterfalls occure when water is placed over a cliff tile.
trees are just randomly placed.
and finaly theres a little bit of cleanup that ensures water at the tops and bottom of all waterfalls.

water and cliffs have set lengths, and also times they draw. but itll prematurely terminate if it blocks itself in.

I realy realy like the waterfalls and plan on animating all the tiles in the future, but id realy like this to showcase waterfalls and elevation, but in a simple fashion. I just haven't figured out a good way to express elevation, and I think my cliff method is poor.


Download: http://www.mediafire.com/download/b476q77vya266ya/Project_random_terra.exe
world consists of 16 rooms. player is purple square with arrow. generation works, player movement works, rooms transitions and collisions also work. player will randomly be placed in a room. and the other color dots are for npc spawning.
arrow keys are movement
spacebar will generate a new world.


this is the look im wanting to achieve with my cliffs, but im thinking I just need to draw the cliff better because how its layed out is good I think...idk suggestions?
 
Last edited by a moderator:
Z

zircher

Guest
Just to throw it out there, what about something like an isometric perspective? It's still an easy way to do tiled terrain, and integrating elevation info into your display looks less distorted. You could build your map flat than add your elevation info. Waterfalls would be indicated by the side of the water blocks and cliffs would be the soil/rocky sides of dirt tiles.

Assorted inspirational examples...
http://pre07.deviantart.net/7439/th/pre/f/2013/138/3/b/isometric_01_by_bananamannen-d65af3j.jpg
http://orig14.deviantart.net/3cbc/f/2014/261/0/0/isometric_landscape_no_4_by_fidorka69-d5ol8v8.png
http://assets2.ignimgs.com/2007/09/12/Landstalker_4_1189566208-2117159.jpg
https://oldgamesftw.files.wordpress...e-war-of-the-lions-20070708081504429-0001.jpg
 

Yal

šŸ§ *penguin noises*
GMC Elder
IMO the best way to do this would be splitting your generation up into two parts: first generate terrain (e.g. which tile is grass, cliff or water), then afterwards you go through the entire room and assign actual graphics depending on neighboring tiles, with multiple graphics for each piece of terrain - for instance, special diagonal cliffs for situations like this, making beaches at the edges of water tiles, and so on.
upload_2016-8-21_12-1-23.png

Most of the time, you'd need to make 16 different versions of every static tile - there's a total of 2^4 possible combinations if you only count the neighbours up/down/left/right and base your graphic on whether neighbours are tiles of the same type or not. It can look off if you have a lot of concave shapes, but it's a good start and it'll definitely look better than the blocky mess you currently have... it's always possible to refine the tiling part later. :)

Another interesting thing I wanna point out... if you do a neighbor check for each neighbor and multiply the 1/0 result with weights like this...
upload_2016-8-21_12-7-25.png
...you get a number between 0 and 15. If you arrange your different tiles in the right order, you can just use the result-th tile instead of having to mess around with a bunch of if statements. AKA if the tile has matching tiles above and below it, the result becomes 5, so you'd use tile #5. (Don't forget that the numbering starts at 0)
 
D

Dengar

Guest
Just to throw it out there, what about something like an isometric perspective? It's still an easy way to do tiled terrain, and integrating elevation info into your display looks less distorted. You could build your map flat than add your elevation info. Waterfalls would be indicated by the side of the water blocks and cliffs would be the soil/rocky sides of dirt tiles.
I actualy don't like the look of isometric, even though it does show elevation very well, its just not my cup of tea.

IMO the best way to do this would be splitting your generation up into two parts: first generate terrain (e.g. which tile is grass, cliff or water), then afterwards you go through the entire room and assign actual graphics depending on neighboring tiles, with multiple graphics for each piece of terrain - for instance, special diagonal cliffs for situations like this, making beaches at the edges of water tiles, and so on.
this is exacly what I was thinking. thanks for letting me kno im thinking in the right direction :)
 
Top