[wesnoth-dev] Hexagonal grid... docs and algorithms

Gabriel Withington gabriel.withington at gmail.com
Sat Apr 16 23:47:25 UTC 2022


Hello,

I'm a developer and applied mathematician currently working on
representations of 2D and 3D spaces using a hexagonal grid... I've looked
around and there doesn't seem to be a lot of information out there.

https://www.emanueleferonato.com/tag/hexagonal-tiles/

But I am familiar with Battle for Wesnoth (as a player) which clearly has
the details well hidden behind elegant GUIs for building and playing the
game. I haven't dug into the code or wiki yet however, poking around the
online documentation got me as close as the "terrain_graphics" tag. So I'm
guessing the complicated details have been abstracted away.

I was planning on writing a series of tutorials with example code for how
to construct, display, index, etc. 2D hexagonal surface tilings and then
extend them vertically for 3D or multileveled map spaces. But there don't
seem to be well documented conventions with explanations of underlying math
or other rationales for decision making and I've already come up with two
indexing schemes which seem helpful.

If it's of interest, I'd like to dig into the code and try explaining the
concepts in ways which would be of interest for Wesnoth developers and
beyond. However, my interest is still in development of material to explain
the concepts in a manner which will encourage broader adoption... not the
dreaded fork but more like a "forge" where other projects get built onto
the engine (I'm a fan of dungeon crawlers, could see tweaking Widelands to
run on the engine and wouldn't mind a DwarfFortress alternative) which may
still be of concern. But as a starting point, I'm interested in scene
rendering which could be helpful for generating map tiles... and might be
of interest for 3D game interactions, if that isn't a verboten taboo.

Sorry for not being more specific in my description or addressing, if
there's a developer who is interested I'd love to coordinate or I could try
pestering the wiki.

Thanks!
Gabriel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.wesnoth.org/pipermail/dev/attachments/20220416/58147abd/attachment.htm>


More information about the Dev mailing list