still working


I got my map generator to actually generate the physical walkable maps. Now just to add interesting things like chest spawns, map exits, and the like.
In response to Gold94
Gold94 wrote:
That's a nice looking inventory system you have. Did you make it? I just rolled my own so I know how much goes into it and all the extra detail. I like the background highlight effect of items and your numbers are so clean. Love how you did the description box as well.
Generating land masses, determining coastlines, and creating a heightmap, although that isn't shown at the moment. Slowed it down so I could watch it working, it only takes a second or so real time.
In response to Flick
I'd love to get a look under the hood on that land mass generator. looks great.
In response to Orange55
Orange55 wrote:
I'd love to get a look under the hood on that land mass generator. looks great.

Its not that complicated really. I draw a line of 'water' hexes around the perimeter (this keeps the land from reaching the edge of the map), a few random slashes of water hexes coming in from the edges, and then seed a bunch of random land hexes. All of those get added to a 'frontier' list. Then, while there are any hexes still in the frontier, I pick a random target from the frontier list, turn any of its unused neighbors into its type, add them to the frontier, and remove the target from the frontier. Repeat until frontier is empty.

Heres one with hills/mountains.

In response to PopLava
PopLava wrote:
Gold94 wrote:
That's a nice looking inventory system you have. Did you make it? I just rolled my own so I know how much goes into it and all the extra detail. I like the background highlight effect of items and your numbers are so clean. Love how you did the description box as well.

Yeah it took me way longer than I care to admit to get it all working perfectly hahaha never been much of a programmer so it took me a while but I got it all working how I wanted :p (just gotta add in the equippables and my inventory is complete)
In response to Flick
Flick wrote:
Orange55 wrote:
I'd love to get a look under the hood on that land mass generator. looks great.

Its not that complicated really. I draw a line of 'water' hexes around the perimeter (this keeps the land from reaching the edge of the map), a few random slashes of water hexes coming in from the edges, and then seed a bunch of random land hexes. All of those get added to a 'frontier' list. Then, while there are any hexes still in the frontier, I pick a random target from the frontier list, turn any of its unused neighbors into its type, add them to the frontier, and remove the target from the frontier. Repeat until frontier is empty.


Dang, I've done something like this before, but didn't do anything like the water slashes, and it made big lumpy boring landmasses that I wasn't happy with at all. I really like what your generator is outputting!
In response to Flick
Flick wrote:
Orange55 wrote:
I'd love to get a look under the hood on that land mass generator. looks great.

Its not that complicated really. I draw a line of 'water' hexes around the perimeter (this keeps the land from reaching the edge of the map), a few random slashes of water hexes coming in from the edges, and then seed a bunch of random land hexes. All of those get added to a 'frontier' list. Then, while there are any hexes still in the frontier, I pick a random target from the frontier list, turn any of its unused neighbors into its type, add them to the frontier, and remove the target from the frontier. Repeat until frontier is empty.

Heres one with hills/mountains.



In response to Flick
@Flick where did you come up with the idea to use lines as the starting points? That's so simple and seems to work really well.
I've been reading a lot of stuff on r/prceduralgeneration, and somebody described something similar to this. However, they were placing both land and water seeds within the map and then growing. This made pretty nice looking maps, but you wind up with landlocked water, which makes figuring out what is ocean and what is lake problematic. I could use a floodfill to figure it out, but my (admittedly poor) implementation made Byond cry...

By extending lines of water from the edges, which are forced to be water, I can guarantee that all the water on the map is joined during seeding. Therefore, it all remains joined after growth. I can then go back in after I've generated my heightmaps and create some lakes if I want to.
In response to Flick
Flick wrote:
I've been reading a lot of stuff on r/prceduralgeneration, and somebody described something similar to this. However, they were placing both land and water seeds within the map and then growing.

That's exactly how proc gen worked in my old game Zen
In response to Yut Put
That may well be the most disturbing thing anyone has ever replied to one of my posts ;)

Working on rivers. This just picks some random mountains as starting points, then flows downhill until it reaches a coast. It works, although it does tend to create some giant lakes. I think I might use this to find where the river would hit the coast, and then use A* to find a cleaner path. I can add some lakes in separately.



EDIT: It doesn't exactly flow 'downhill'. It flows to the lowest neighbor hex that isn't already part of the river, which can be higher than the current hex. Otherwise you can get trapped in a basin, and then I'd have to model water levels and such to see where it would overflow the basin. I'm not really shooting for that level of realism, just interesting.
That's awesome! I'm really getting a Dwarf fortress vibe from watching the world build.
In response to Flick
@Flick: I like the rivers/lakes. Bigger lakes are more meaningful and interesting.

On the side, seems like applying some sort of elevation would at least be an interesting exercise and could help with lake/rivers. Basically, a lake can build until it runs into a steep run off and then it's back being a river. Would also support snowy regions which leads into bioms which leads me into wanting to distract myself with some maps generation projects. lol

Working on territories and roads. Right now, I'm just drawing roads between all neighboring territories. That won't always be the case. Different races/factions may or may not do enough trading to generate a road between them.


EDIT: @PopLava I'm sort of going with both. Most rivers will generate fairly direct paths between source and ocean. Occasionally they will meander more and create lakes. Sometimes large inland seas really.
In response to Flick
Flick wrote:
Working on territories and roads. Right now, I'm just drawing roads between all neighboring territories. That won't always be the case. Different races/factions may or may not do enough trading to generate a road between them.


EDIT: @PopLava I'm sort of going with both. Most rivers will generate fairly direct paths between source and ocean. Occasionally they will meander more and create lakes. Sometimes large inland seas really.

2 things. The roads could try to follow the geography more, it doesnt necessarily make sense for them to go through mountains,

and different road tiles for different terrain aesthetically makes sense
In response to Yut Put
Agreed on both counts. I think this is a little better pathing for the roads. Don't have multiple tile types for different terrain, but it does at least autotile now :P The roads take quite a while to generate, so there is a bit of a pause after the rivers are drawn. I'll have to see if I can tweak that a bit. I also slowed down the seeding generation so you can see a bit more about how it starts out.
Made some with a reduced tile size so the grid doesn't show. Screws up the tile placement a bit, but it still looks pretty good.
Click to enlarge
Added a few things in. Basic forests and some smaller towns within regions.
Page: 1 2 3 ... 353 354 355 356 357

Login to reply.