How to generate a hexagon map?

I want to generate a hexagon tile map with 2d array for loop but i dont know how. I only know how to generate a blocks map of squares. This is what im trying to create for game:


Thank you for help.

1 Like

You may want to read this awesome article:

It’s interactive, so click the “flat/pointy” buttons.


Thank you. Very good resource.