Hacker News new | past | comments | ask | show | jobs | submit login
How to Create a Hex Tile Grid Map in Excel (simplexct.com)
102 points by sebg on Nov 15, 2021 | hide | past | favorite | 23 comments



This article on defining hex grids in code is a classic:

https://www.redblobgames.com/grids/hexagons/


really not related, since the excel grids are part of their charting features, rather than coding it from scratch using primitives in excel.


> really not related

True, but now I've discovered a bunch of interesting articles on procedural geometries, Thanks HN!



Here's a couple repos of different hexagonal Cellular Automata I made that can support 16 million+ cells using SSBOs for storage.

C: https://github.com/churchofthought/HexagonalComplexAutomata

https://github.com/churchofthought/ScatterLife

JS (WebGL):

https://github.com/churchofthought/Grautamaton


Doesn't using a one-hex-per-state model basically defeat most of the benefits of using hexagons in the first place? This seems like a bit of cargo-culting the idea that hexagons are good for maps without actually understanding why.


They look neat, and that's probably a sufficient reason for most people to use it. For anyone looking at optimizing some problem for which hex grids are a solution, they're not likely to be using excel, I think.


It wouldn't surprise me if the author is an avid D&D fan, and was looking to make RPG maps on company time.


D&D doesn't use hexes for combat mapping. The rules are designed with squares and adapting them for hexes would require house rules


Search for “hex crawl”, it’s a sandbox style campaign.


There's no reason to assume someone working with Excel is necessarily doing so on company time, I think.


You surely mean a dedicated Civ player perhaps.


No love for Catan?


I think the biggest question is can hex grid approximate US state topology/geography better than square grid, which would be the main alternative. Intuitively I'd guess yes, but would be nice to verify that.

Similar maps using square tiles: https://marcsoares.ca/designing-a-better-tile-map-of-the-uni...


Wisconsin bias, but I'm glad they decided upon a map that didn't have WI above MN and MI, but the placement of NY is crazy.


> the placement of NY is crazy.

I tentatively agree, I'd try harder to keep coastal states on the "coasts" in such tile map. That being said, I don't know how hard that would be in practice.


> I'd try harder to keep coastal states on the "coasts"

Especially for states where the coast is one of the defining characteristics of the state. :)

For the final map I think that coast could have been increased in size. But you're right that could have had cascading effects.


there more square us states than round states


But majority of states have borders with >= 4 neighboring states and on top of that you have coastlines, so that leads me to think hexes might work better.


I'm working with hex grids in Python right now: https://github.com/RedFT/Hexy is really helpful.


I'm a bit disappointed that this wasn't about RPGs, using web-based Excel as some kind of virtual tabletop...


I wish there was more medium level content like this available for office.

It's easy to find basic tutorials of the 'Press the B button for bold' level. You know, where messing around with the interface for a few minutes brings you up to speed.

Also easy to google for VB stuff and manual-style things. What function or code sample do you need to accomplish X.

But the level in between, where you find about less known functions and interesting usage of tools, is hard to learn. You can stumble around until you find a gem, but I am not aware of organized repositories.


One of the last steps is to translate all the odd rows horizontally by the same amount, so that the hexes line up. That makes the correspondence between what you drew to begin with and what you end up with strange. I'd find a linear transformation more intuitive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: