Hex based procedural world generation?

I want to make a civ 5 like game and i have some troubles regarding map generation should i generate the world and the divide it into hexagons or should i make tileable hexagons and generate the world from those?

I think it would be much easier to make tile-able hexagons and generate the world from those. That way rather than having to query your environment for what type of resources or land type an area is, you can just generate your hexes with the knowledge built in.

First off, I completely agree with generating hexes that tile instead of generating a world that you try to divide. This doesn’t mean you can’t use standard noise methods for procedural world generation to do it, it’ll just be easier to build it via hexes. The exception to this can sometimes be mountains and rivers depending on which method you decide to take for it.

As far as resources, it depends on how you want to hold data. I would argue in a game like Civ that you would actually want to keep the data for resources stored in a two dimensional array and use some coordinate math to figure out which coordinate into the two dimensional array you end up in.

The big bonus of path3tic’s way is that it’s a simple line trace to figure out what hex you would be in. The downside is that his method doesn’t work as easily if you batch the hexes into an instanced static mesh. Which you’ll probably want to do for performance reasons.

The goofy thing about Civ is that resources are almost an overlay because they turn on at certain points in the game after a player gets a certain research, but only for the player that got the research.