Showing posts with label Hand Drawn. Show all posts
Showing posts with label Hand Drawn. Show all posts

Thursday, January 7, 2021

Genuary 2021 Day 7a: "Rules by Hand"

 Ok, revisiting the prompt for today, which reads:

"Generate some rules, then follow them by hand on paper."

I don't feel like my previous piece really lived up to that first word - and, in so doing, I missed perhaps the most important part.

So, I started over.

I generated some rules this time, from a small list of nouns and a handful of templates. The generated rules ended up:

next to each yellow star with no adjacent purple moon, place one blue waves

fill all spaces next to red circle with green diamond

place one purple moon next to each green diamond

find a space adjacent to green diamond and green diamond. Place a blue waves there.

next to each blue waves with no adjacent blue waves, place one green diamond

find a space adjacent to purple moon and blue waves. Place a yellow star there.

find a space adjacent to purple moon and purple moon. Place a purple moon there.

find a space adjacent to blue waves and blue waves. Place a green diamond there.

place a blue waves next to a green diamond

fill all spaces next to blue waves with green diamond

next to each red circle with no adjacent purple moon, place one red circle

place a yellow star somewhere


And I did this over and over again, until I couldn't. (Actually, I missed a spot, so you can finish the work, if you like.)


The red circles in the rules never had an opportunity to be generated, which I'm sorry about. Maybe next time, I'll seed with a few red circles.

Purple moons definitely provided an "insulating" layer - they would spawn outside of green diamonds, and then not spawn anything but other purple moons. 

Yellow stars would generate blue waves,  which would generate another yellow star, and so we get double stars.

Neat little patterns.

Tools Used: Gel pens, hex grid graph paper

Languages Used: Python

Development Time: ~2 minutes

Drawing Time: ~60 minutes (I was also watching Star Trek: Discovery)

What's Generative Here: The rules were generated. I had a certain amount of freedom to pick things, which made me a randomizing agent within the rules. I was tempted to try to steer the growth, but I kept forgetting what patterns I was trying to set up.




Genuary 2021 Day 7: "Rules by hand"

 


Some sort of space filling road network, maybe?

For this, I decided that I would make a network of connected nodes. My rules, which I sometimes failed to follow exactly, sometimes adapted for conditions I hadn't anticipated:

  1. Roll D6 for number of exits

  2. Go clockwise, rolling d6 checking if that number is equal to or over the number of exits remaining

  3. Roll D6 for distance from those exits

  4. Go to 1


Not specified is how to start. So I just picked a center-ish hex on some hex graph paper I had lying around. (You don't have blank hex graph paper within arm's reach? I don't know how you even live.)

I rolled a 2, which led me to two exits from the starting hex. That made a cute little macaroni elbow to begin things. I rolled the distance that each exit would go from the starting hex, got a 2 and a 5 in order, which I drew as tubes or roads or pipes or ganglia.

For each node, I'd roll to see how many exits to open up out of the hex. If the roll was over the amount of available directions to go, or under the number of exits already opened to that hex, then I'd clamp to the facts on the page. To determine which exits to open, I'd roll a d6 for each direction, and open an exit if the roll was less or equal to the number of exits remaining. If the number of exits available on the page were equal to the number of exits that I was supposed to roll, I'd skip rolling, and just fill in the remainder. This isn't exactly balanced, as when there's two sides of the hex remaining, and 1 exit to allocate, the rule says to roll d6, and on a 1 open the first exit, and therefore on a 2-6, you don't open the first exit, but implicitly you must open the last exit. So, this could be reshaped some.

Sometimes, I'd roll that a node has one exit, and that node would already have a road leading up to it, so that's a dead end.

Sometimes, the road would be specified to meet up with (or go through) an open node. In this case, I'd allow the road to meet up with the open node (but not go through, unless the exit rolls said so later). If a road was supposed to go off the page, or meet an existing road, I'd go as far as I could and place a node at the last empty hex.

Several bits of judgement involved - I think I could come up with a v2 of the rules that explain my interpretations of the edge cases.

I'd kind of like to code this up as a street map and drive a car around on it in a computer game.

I'd also kind of like to code this up and generate city street maps - maybe allowing roads to meet each other. Generating buildings on nearby lots would be cool.

Tools Used: Pencil, hex grid graph paper, Chessex Purple with White Translucent D6

Languages Used: English?

Development Time: ~2 minutes

Drawing Time: ~30 minutes

What's Generative Here: At every step, the network expands in a way determined by a random process implemented by a die. 




Wednesday, November 6, 2013

Doors on the map


There are going to be some number of player-interactable objects on the map, from doors to dead bodies to chests. One could imagine even more, like pools and traps, but that's probably beyond what I'll do for November.

The fundamental thing about a door is that it has two states, open and closed. When open, it blocks sight and movement. When open, it allows both. The way that my visibility and movement code works is that an entire hex is movable/immovable, transparent/opaque. Given that, it makes sense for doors to be centered in a hex.

I've added two doors in the above map, and in each case, the joining of the door to the surrounding walls is problematic. For the horizontal door (permitting movement North/South), I could create special corner pieces that meet up with the door, which wouldn't be too bad. For the vertical door (permitting movement East/West), the connecting pieces seem trickier to get right.

I've also added the vertical lines making the N/S walls seem a little smoother. That requires more adjusting, especially once I get wobbly lines in.

The text there won't be visible in-game, it's just notes for me as I sketch out this encounter.

I'm currently planning on 10 encounters of roughly this size for my November game - I may rearrange this one pretty substantially, since the fiction is that these are portions of the Tower of the Rat King, and the above layout feels like it's been carved out of solid rock, like a dungeon. Perhaps this part of the tower is set against the hillside.

Tuesday, November 5, 2013

More hatch testing


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.

Monday, November 4, 2013

Hex Tile Wall Test

For the next game, I'm going to tackle interior spaces, which present some obvious problems with hex grids. I've considered abandoning the hex grids and moving either to square grids (boring!) or to "natural" grids based on Voronoi regions. I think that latter has some interesting possibilities, but there are so many unanswered questions there that I'm going to defer experimenting with it until the new year.

The above tiles capture some of the hand-drawn hatching of, e.g. Dyson Logos. There's more work to be done, but when I look at the effect there, I see a felt-tipped pen stroke, which isn't quite what I'm going for, but it's not bad.

I wrote a little Python script to output 14 different hex tiles, and I assembled them (duplicating a few here and there) into a little room by hand in GIMP. The slant in the hatching makes the entire map seem rotated, but that's just an optical illusion. Will I fix that? Maybe. Perhaps I'll take a page from Dyson's maps and mix up the hatching, all different directions. That could be fun.