Several pieces went into the above map:
- rewrote the "inHex" math - each of the penstrokes that you see there is actually composed out of a sequence of positions along a line, which then gets a "brush" image applied to the tile, more like a rubber stamp than an actual brush. The image is something like 20% or 30% alpha, but since the images overlap so much, eventually, you get a pretty dark section in the center of the stroke, fading out to the edges. This achieves the felt-tipped pen effect, even though that's not exactly what I had in mind. Rather than figuring out where the strokes should begin and end, I just filter out the bits that aren't in the hexagon, or not in the section I want to hatch (a corner has only one quadrant that I want hatched, for example). I had taken the JavaScript code that I was using inside my previous games for turning screen clicks into hex indices, rewrote it in Python, and using that to know if the pixel was inside the hex. I got something wrong, and things seemed rotated 90 degrees, which I couldn't understand, but it turned out I was just truncating when I should have been rounding.
- generating twelve versions of each feature - since I'm generating these tiles in Python, it's easy to create a bunch of variations. In this case, I slope the hatches at three angles up, three angles down, and then I rotate them 90 degrees, for a total of 12 different hatch directions. I don't want anything too close to horizontal or vertical, and even 45 degrees off feels wrong, so maybe I'll regenerate things again.
- Hexographer, from Inkwell Ideas - I don't mind plugging Hexographer - it's a Java-based map editor that does hex tiles. Not a lot of tools out there run on Linux, or do hex tiles, and this one does. I haven't used it much, but so far, it's suiting my needs. I wrote a small script to create a list of my custom tiles, imported that into Hexographer, and was able to assemble the above map in a few minutes.
Looking at that, I imagine the party coming in through the passageway in the Northeast, fighting some guards in the first room, one guard fleeing to the South, and the heavy combat forces ambushing the party from the Northwest. That sort of combat progression might be more than I'll deliver this month, but it'd be a cool place to go.
A few things I want to add:
- wobbly pen strokes - look at how ruler-straight those lines are. If there was some variation in the line, perpendicular to the overall direction of the line, it'd look more hand drawn.
- finished edges on some full hexes - the East/West walls all have that horizontal, smooth, line marking the surface of the wall, but the North/South walls only have an edge when it cuts the hex in half. Adding hexes that are solid, but have an edge would be easy enough. I might have to do something tricky to get the edge to sit inside the full hex. Shouldn't be hard
- ball point pen style - the felt tipped pen style is OK, but I think I want sharper, less fuzzy strokes. Like a Uni-Ball Vision Needle pen. I can draw some lines with one of those, scan them, and experiment to reproduce the actual physical marks.
- doors - the heroes need to knock down doors.
- columns - block movement and visibility
- other terrain features - some things would block movement, but not visibility (a portcullis, perhaps?)
... and the imagination runs much further than that, thinking about how lighting is going to be done, how the AI will handle retreating and engagement, if I wanted to have secret doors, how that would fit in to the above tools, and so much more.
No comments:
Post a Comment