View Full Version : SVG hex grids
10-07-2010, 07:02 AM
I made a little online hex grid generator that outputs SVG files. It's just simple black line on transparency at the moment, but colors would be easy to include, as would hex numbering and so on. Because it's SVG you can scale it however you want without any distortion, load it in Inkscape or GIMP, etc., so some of you might find it useful.
I just did it for fun, but if anyone thinks this is worthwhile or has feature requests let me know and I might expand it into something better.
10-07-2010, 09:20 AM
Awesome. Have some rep. Also, numbering would be a great addition I think. Could you make it so that you can select the font/size used...or so that the text items are "live" so they can be changed in Illustrator, etc.? That'd be cool.
10-07-2010, 04:54 PM
Excellent! Great for making boardgame maps! Thanks!
:: Edit :: This is so cool. Just generated a 100 x 100 hexgrid (which is as much as I'll ever need). Each hex is an individual object so I can use as many as I need. Fabulous! Have some rep! Numbering would be out of this world and very appreciated!
10-07-2010, 08:02 PM
I've added optional hex numbering, and the text elements are individually editable in inkscape (you can change the font, etc), so I assume they would be in Illustrator too.
Is it roughly what you guys were wanting?
10-07-2010, 09:34 PM
I just added color options for the grid and the numbering.
10-08-2010, 04:00 AM
This works like a dream in Drawplus. The colours don't really matter so much to me as I can set those myself, but could I request:
a. Is it possible to have the numbers on a separate layer to the hexes?
b. Is it possible to have different numbering options? For example without the comma or A0, A1, A2 etc where the letters correspond to columns. (trying to think of other conventions)
c. Is is possible to have an optional dot in the middle of each hex (again on a separate layer) to measure lines of sight? (I know some games use these).
I think this is a one of a kind application on the net, you should mention it on Boardgame Geek. I'm sure there are a lot of folks over there who would appreciate it.
10-08-2010, 06:37 AM
Is it possible to have the numbers on a separate layer to the hexes?
SVG doesn't seem to support layers, but it can handle groups of objects, so I've put the hexes and numbers in their own groups; see if that does the trick.
Is it possible to have different numbering options? For example without the comma or A0, A1, A2 etc where the letters correspond to columns. (trying to think of other conventions)
As a first step toward that, I've added a user-specified format string for the hex labels. The string can contain whatever characters you want, and the special symbols "%x" and "%y" will be replaced with the hex column and row, respectively. So the original formatting (column, comma, row) would be gotten with "%x,%y". If we figure out what other kinds of labels should be possible, I can extend the format options.
Is is possible to have an optional dot in the middle of each hex (again on a separate layer) to measure lines of sight?
Added an "enable guides" option, along with an associated color. The dots will be in their own group.
10-08-2010, 08:13 AM
Neat stuff Isomage, not sure if I'll ever need it, but thanks for posting.
10-08-2010, 02:04 PM
I can't believe how quickly you're doing this....it's like magic! :)
The groups work fine in drawplus as do the centre dots.
The only thing (because I'm thick that way) that I can't work out is what to use to substitute the %x,%y to get different strings? Would it be possible to number the hexes sequentially across or down?
10-08-2010, 02:25 PM
10-08-2010, 09:57 PM
Would it be possible to number the hexes sequentially across or down?
It is now :) In a format string, %n will be replaced with the downward sequence number, and %N will be replaced with the across sequence number.
I added to the web page an explanation of how format strings work; hopefully it's a bit more clear, but let me know if there's anything I haven't explained well enough.
SVG doesn't seem to support layers, but it can handle groups of objects,
That is how Inkscape implements layer/sub-layers.
Take a look at a layered example from inkscape and try to make your layer groups compatible.
10-12-2010, 03:05 PM
It all works like a dream in Drawplus on the import!
10-17-2010, 10:18 AM
Sweet. By the way I love your stuff. I can't seem to get enough of hex maps. Have some rep.
10-17-2010, 03:29 PM
Oh Iso, I just thought of another potential improvement: Being able to determine the start number of the first hex so that if there are a number maps the user can make them continuous.
Powered by vBulletin® Version 4.2.3 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.