top | item 33261766

Wargame: LaTeX package to prepare hex'n'counter wargames

149 points| ddougj | 3 years ago |ctan.org | reply

27 comments

order
[+] woliveirajr|3 years ago|reply
Remember first time I tried to generate some hex map for wargames using a computer and realized that no one had printers bigger than A4, they were monochrome and so on... and how hard it was to generate one using just pencil and ruler.
[+] fho|3 years ago|reply
> and how hard it was to generate one using just pencil and ruler

Oh I did that when I was ... young :-)

My aunt worked in the printing industry and we regularly got the big leftover paper rolls from her. I am talking about one meter by tens of meters. When I learned about wargaming I immediately drew a huge 2x2m hexmap by constructing the hexes from equally spaced triangles.

Sadly that was before digital photography ... I would love to see that old map again.

[+] glomgril|3 years ago|reply
Brings back fond memories of fiddling with TikZ for hours instead of writing my dissertation
[+] feet|3 years ago|reply
And on various homework assignments, I feel like I wasted so much time but the result was usually beautiful
[+] mdiesel|3 years ago|reply
And then discovering that if you used latex for a presentation you could animate in tikz...
[+] delta_p_delta_x|3 years ago|reply
TikZ is wonderful, and any graphics prepared with it just have an edge of professionalism that raster graphics don't.

I really just wish we had a WYSIWYG interface for it, à la Illustrator or Inkscape (yes, the latter can export to TikZ, but I would like a vector graphics editor specifically to work with the TikZ model).

[+] jonititan|3 years ago|reply
TikzEdt does but it hasn't been updated in ages.

tikzedt.org/

[+] PontifexMinimus|3 years ago|reply
On a related note, does anyone know of a Javascript/Typescript library (or framework) for doing hex-based wargaming on the web platform? Something that draws the maps, allows the user to give orders and move the units around, and resolves combat etc?
[+] JoeDaDude|3 years ago|reply
Vassal is not exactly what you are asking for (not web based for example) and it does not generate maps or counters, you have to create your own and import them. But it does allow players to share a screen, move counters, and play a game over internet. This is known by most wargamers, so my apologies if I am pointing out the obvious,.

https://vassalengine.org/

[+] mmastrac|3 years ago|reply
I used to check out books from the library with hex/counter sheets in them. They had all sorts of themes, but they were fascinating to play with.
[+] JoeDaDude|3 years ago|reply
Nice to see a freeware tool for this, it might be the only one. There is a commercial tool that works quite well if people don't wat to mess with with LaTeX:

http://www.hexdraw.com/Word/

[+] Raineer|3 years ago|reply
Meh, except it's not available.
[+] theptip|3 years ago|reply
This is cool! I was just pondering some leisure coding on a hex-based game, and the manual for this package gives some good detail on the underlying mathematics for such a coordinate system.
[+] V__|3 years ago|reply
What makes LaTeX so horrible to use (for me) is the need to use packages for seemingly simple things which have weird dependencies and error messages only experienced users know how to deal with. This package is just one more layer of absurdity to me. Why does everything have to be solved with overly complex packages? Graphics are a thing for a reason. Am I alone in this?
[+] eslaught|3 years ago|reply
So it sounds like you're asking for a package where you get (basically) the ability to draw lines, circles, textures, etc.: the basic graphics primitives.

Here's my question to you: would you really want to build a hex map at that level? To me, that just seems an awful lack of abstraction. It's one thing if everything you do is a one-off figure, but for this you really want something that packages it together in a way that makes sense. If you don't get that from something like this package, you're going to build it yourself (best case), or just do without (much more likely) resulting in ugly, impossible to maintain code. I know, because I've been there.

Here's a challenge to you: what exists outside of the Latex community that is remotely comparable to this? (And not just this, but any of the number of other Latex packages that do similarly impressive things.) I could be wrong, but as far as I know those things generally don't exist. Maybe the closest match would be in the web/JavaScript community, but I don't think those things make it so easy to generate PDFs (especially high-quality ones). Latex, for all its faults, seems to encourage this sort of highly powerful level of abstraction.

I share your frustrating in trying to get things to integrate, but for this sort of thing I just don't see a good alternative.

[+] tangus|3 years ago|reply
No. Take a look at ConTeXt <https://wiki.contextgarden.net/Main_Page>, another TeX superset. It integrates TeX typesetting with MetaPost graphics and Lua programming, and does a much better job than LaTeX, in my opinion. Although LaTeX has infinitely more libraries, extending ConTeXt isn't as difficult and cumbersome as creating LaTeX packages.
[+] VMG|3 years ago|reply
there are extremely few vector graphics libraries as powerful as TikZ