# Tag Info

7

This is most intuitive way that I can think of.

4

The usual approach here is to pretend like you're solving a maze blindfolded: keep your left hand in contact with the wall, and follow its contours until you reach the exit (or in this case, until you return to your starting point) Assuming we start with some tile in the region we want to outline, but not necessarily on the edge of that region, we can keep ...

3

I see you already have an answer to your question, but I'm going to add another answer for anyone who's trying to solve a simpler variant of the question. Civilization puts borders between hex tiles when the owner of the tiles are different. The simplest algorithm is to look at the edges between tiles: let H : iterate over all hexes let N : iterate over ...

2

As long as they don't differ too vastly, the ratio of sizes between the two cell types is largely irrelevant to me. I'd also happily use several rows of transitional tiles if their borders can be procedurally determined. I also have no inherent preference for up-point or side-point hexes... This paragraph made me think of another, more universal solution: ...

2

For keyboard inputs, a simple but effective implementation is to have a set of keys that when repeatably pressed, change the player's orientation by rotating through the surrounding tiles in a clockwise or counter-wise direction. So you could set the 'A' and left arrow keys to cycle through adjacent cells in a counter-clockwise direction and the 'D' and ...

1

You can achieve the desired result (if I interpreted your picture correctly) by replacing your point_distance function with something like this. The function determines the number of steps that are required to go from hexagon (x1,y1) to hexagon (x2,y2). This works by first determining the number of diagonal steps (which decrease the X and Y distance ...

1

You can create a hexagonal pattern with square tiles by creating each logical tile from 2x2 technical tiles and then arranging them in a staggered pattern like this: This might, however, require quite a lot of transition tiles. But if your engine allows tiles which are larger than the technical grid size, then you can design tiles like this: The ...

1

I believe what you're looking for is what I refer to as "Google Maps" style panning. This is where the pointer stays perfectly locked on the exact place in the world where you started the pan. Like @DMGregory mentioned, you need to do everything in world space. You start by caching the pointer's position in world space when the drag begins. Then ...

1

I thought I was too smart for my own good. After many, and I mean, many hours of fighting this, I had to fall back to DMGregory's answer in the fullest. Every single time I thought I had it, there some weird generation that gave me a new angle and direction that would not be caught. I was very stubborn walking only the edge cells. You have to walk the ...

Only top voted, non community-wiki answers of a minimum length are eligible