Skip to Content
 

Line of sight in hex games

11 replies [Last post]
Desprez
Offline
Joined: 12/01/2008

I'm in the planing stages of a squad-level tactical sci-fi game.

I want the movement and combat system to be somewhat realistic, but I don't what to slow down gameplay too much. (The ever-present problem)

Two areas slowing me down are range and line-of-sight.

Range is easy in theory, this weapon can shoot 4 hexes, that weapon can shoot 10 hexes, etc. The problem is in looking at the board and seeing if you can reach a target. It is not immediatly apparent what your range is without counting individual hexes for different units - very time consuming.

Line-of-sight is a bit harder. (Is this clump of trees in the way, can i see over the lip of that hill, etc.) I already know that this will have to be an apporximation. I have come up with a few simple rules to determine if a unit can be spotted, but as with the range issue, it isn't always immediatly apparent just by glancing at the map.

In both of these cases, you have to analyze each individual situation. Count hexes for range, analyze in-between hexes for LOS.

These things slow the game for even just a few units.

------
So, does anyone have expirence with effective line-of-sight systems?

Perhaps I have been blinding my self to a much simpler way of getting around these problems?

Or does anyone think that these things aren't as bad as I'm making them out to be?

larienna
larienna's picture
Offline
Joined: 07/28/2008
Line of sight in hex games

I know that there is another thread that shown a way to determine line of site on an hex map without using a rope or a ruler, but I can't remember the thread's name.

But I dont think it will necessarily speed up the game. Instead you could use some or of ruler of different shapes made of hex to determine the line of sight. For the range, you could make yourself some sort of cone made of hex which covers all the hex inside a specific range ( 60 degree ).

OutsideLime
Offline
Joined: 12/31/1969
Line of sight in hex games

Here's that old thread on this same topic, from waaaayy back when I was a poor newbie with a giant robot for an avatar. *sniff* Lots of nice diagrams, and everything! :-)

Line-of-sight issues on hex maps

~Josh

Julius
Offline
Joined: 12/31/1969
Line of sight in hex games

I use a simple method in my board games that use hexes:

If the unit is completely blocked (you cannot draw a path from any corner of the attacker's hex to any corner of the defender's hex without touching or passing through an obstacle), you cannot attack.

If the unit is partially blocked or out in the open (at least one path from any corner to any corner does not touch or pass through an obstacle), you can attack.

Edit: If you want cover rules, keep in mind the tricky situation of two units standing against a 'wall' - where the jagged edge makes multiple corner to corner paths that "go through" occupied hexes.

In this case, use "If you can make a path through two non-adjacent hex faces on the obstacle, but at least one open path, the defender can be targetted, but has cover." In this case, Z has cover.

Desprez
Offline
Joined: 12/01/2008
Line of sight in hex games

That's pretty close to what I had.

I like the cover idea, giving a bonus to deffence.
What I had was that a target is blocked if the line of sight (center to center) passes inside of 2 corners of a single blocking hex. (passing inside of just one corner is sighted)
Passing inside just one corner each of multiple blocking hexes is still sighted if they are on the same side of LOS, but blocked if from opposite sides.

That is simplified somewhat by wording it such that if there is no clean LOS from any portion of the attacking and target hex, then target is blocked.

Now, it gets complicated. : )

Hills -This wasn't covered in the older thread.

Dealing with varting terrain levels has some problems. This is further complicated by the issue that a change in elevation over one hex can represent an abrupt change (like a building) or a gradual change (like a slope)

So, if a unit is on top of the edge of a hill he can obviously see into the lower area. But what if he is one hex back from the edge? Now what areas are visible? On top of a building he might see nothing, but on top of the slope, surely something will be visible.

Conversely, a unit can hide behind an obstacle, but at some elevation it becomes targetable again, depending how close to the obstacle it is.

I have some ideas mapped out covering these situations, but I don't have time to post more just now.
I'll try to post with some nice graphics later today.

Desprez
Offline
Joined: 12/01/2008
Line of sight in hex games

Ok, here is an idea for finding LOS on terrain with various elevations.

First, for simplicity, we aren't going to distinguish between an abrupt change in elevation like walls, and more gradual slopes, like hills. Well, at least not as far as LOS is concerned, movement is another story.

First, the following rules assume that something isn't otherwise blocking line of sight, like an obstacle that is higher than both the shooter and target.

If one unit has LOS, so does the other.

1) You can always see into hexes that are adjacent to you.

2) If you aren't on the edge of a cliff:
You can spot hexes that are on the same level, or that are on the edge of a cliff higher than you.

3) If you are on the edge of a cliff:
You can spot hexes that are on the same level, or that are on the edge of a cliff higher than you. You can also see into hexes that are below you AND are not at the base of a cliff (on the opposite side of you)

Alternately, you could look at number 3 like so: If you are immediately behind an obstacle, it completely hides you from that direction. (But not from adjacent units, as mentioned in rule 1)

Now because it isn't really all that complicated, there is probably a better way to explain it. Seeing as it's 2am, I probably can't do any better right now though.

So, here is a diagram showing a simple field of elevation changes, and what can be seen from different hexes. Perhaps that can explain better what I mean.

Blue Tank = Shooting Unit
Red Tanks = Hexes that can be seen into from the Blue Tank (and be seen from)

Optional Rule) For units hiding directly behind an obstacle, you might elect to say that it can be spotted at and above the same slope from the grond to the height of the obstacle. (Example not shown in diagram)
So, if a unit is behind an obstacle 1 elevation higher, then it can be spotted from 2 higher 2 hexes away, 3 higher 3 hexes away, etc.
And if it is behind an obstacle 2 elevations higher, then it can be spotted 4 higher 2 hexes away, 6 higher 3 hexes away, etc.

For areial units, you could say that if they are flying at nap-of-the-earth level then the use ground unit spotting rules.
If they are flying high, then they can see everything. (and be seen by everything)

Julius
Offline
Joined: 12/31/1969
Line of sight in hex games

Your elevation rules are nice (if a bit cumbersome), but may I point out that they become a complete nightmare if you aren't attacking in a straight line, and terrain changes are different depending on how your choose the path to the target.

I'm going to tell you guys something that you don't want to hear: Somewhere, deep inside each of your (our) heads, is a voice screaming 'It's only a game!!!'

If it were me, I'd word it like so: "Elevation changes have no effect on line of sight."

I would instead have elevation translate into combat. Attack bonuses from higher ground, increased range, etc. I know it may not be the realistic approach you are looking for, but in board games, simplicity is king.

Desprez
Offline
Joined: 12/01/2008
Line of sight in hex games

Determining if a unit is "behind" an elevation change, or on the "facing" edge of a cliff, falls under the same spotting rules as finding if an obstacle is in the way.
So it's only as much of a nightmare as the normal spotting rules.

What I'm currently thinking goes somewhat like this:
A hex is a potential blocker if the LOS line runs through 2 non-adjacent sides. (Or you could think of it as passing inside at least 2 of its corners.)

But, like I said, my wording was a bit awkward.

Basicaly think like this, you can see everything within one hex.
After that, you can see everything on the same level,
• minus those hexes blocked using normal LOS rules.
• but including those hexes on higher elevation, if they are on the edge of a cliff facing you.

If you're not on an edge, you can't see anything lower.

However, if you ARE on an edge, you can see anything lower then you,
• minus those hexes directly behind a hex that is higher elevation than the target

Here is another friendly graphic to illustrate.
Red Xs indicate no line of sight.

A) LOS=True. Following the LOS, the higher tank is on the edge, and the lower tank is not behind a cliff. Both conditions are necessary for LOS, if either tank was positioned 1 hex right, LOS would be broken.

B) LOS=False. The higher tank is not on an edge, and the lower tank is behind a cliff. Either of these are sufficient to prevent LOS.

C) LOS=False. The elevation 3 terrain acts like an obstacle as it is higher than both tanks.

D) LOS=False. While the highr tank is on the edge and can see down, the lower tank is hidden behind a cliff.

E) LOS=True. Same as situation A, the higher tank is on the edge, and the lower tank is not behind a cliff.

F) LOS=False. While the lower tank is not behind a cliff, the higher tank is not on the edge, so it can't see over the lip.

Now, to address the complexity issue.
Some games won't benefit from such detail. I think the smaller scale your scanarios is the more it becomes advantageous.
For the particular game I had in mind, I'm thinking of squad level detail.

Also, good spotting rules are also important in city-scapes and landscapes that have radical elevation changes, than fairly level landscapes. And I hope to have all of these.

Some scenario examples:
Snipers in high buildings can see over smaller buildings and walls, unless the target happens to be hiding right behind those obstacles.

A ridgeline could seperate to opposing forces, but someone on a hill could see over it and spot targets.

I don't think either of these tactical scenarios could exsist well if elevation is ignored.

Julius
Offline
Joined: 12/31/1969
Line of sight in hex games

Alright, so your scenarios are relatively simple, but what about a unit in the hex occupied by the letter 'C' attacking a unit in the hex occupied by the letter 'A.' Is it clear, open, or cover? I could argue all three.

And wouldn't line C be 'cover,' not blocked?

Desprez
Offline
Joined: 12/01/2008
Line of sight in hex games

Ah, I see the confusion.

I haven't decided if I'm actualy going to include the concept of cover.
I may end up with either you can spot the unit or you can't.
As such, I was figuring LOS without a "cover" option.

However, if I include cover, then those situations that fall under "cover" status would be targatable at some kind of peanalty.

So, here is a summary with and without the cover concept.

Without cover:
C) LOS = Blocked

Hex A - Hex C) LOS = Blocked. The center to center line traces within two corners of hex B, so it is a potential obstacle. As such it means a unit in Hex C is not on the edge relative to a unit in Hex A.

With cover:
C) LOS=Cover. (but just barely targatable)

Hex A - Hex C) LOC = Cover. Center to center traces within two corners of hex B, and it determines if the unit is on the edge or not, so LOS is blocked. However, at least one line from C to A can be traced without going through the obstacle of hex B, so LOS becomes cover.

To revise the previous post if using cover rules:
A) Clear
B) Blocked
C) Cover
D) Cover
E) Clear
F) Blocked

------
This raises another point about targeting units considered in cover.
If one wanted, you could have two levels of cover.

1) Light Cover
Center to center line clear
At least one line blocked

2) Heavy Cover
Center to center line blocked
At least one line clear

EDIT:
Ok, I was using Heavy Cover rules for the revision, so here is yet another revision if distinguishing between Light and Heavy cover.
A) Light Cover
B) Blocked
C) Heavy Cover
D) Heavy Cover
E) Clear
F) Blocked

Additionaly:
Hex A - Hex C) Heavy Cover
Center Tank - Hex D) Light Cover
Lower Tank - Hex left of Hex F) Light Cover (Because of Hex F)

larienna
larienna's picture
Offline
Joined: 07/28/2008
Line of sight in hex games

The big question is : Do you absolutely need to put that much details in your game to get the feeling you want.

If not, than ignore terrain level. A game never needs to be 100% realistic.

Desprez
Offline
Joined: 12/01/2008
Line of sight in hex games

Well, I was hoping there was some ultra-elegant way to evaluate LOS and terrain variations that I hadn't thought of before.

So far, I haven't seen any suprise magical solutions...

As far as the "cover" concept, I'm finding that it's actualy easier to evaluate a generalized "At least one clear line, at least one blocked line" than to visualize whether or not a center-to-center line falls inside 2 corners of a given hex.

So in that regard it meight be a good add, but.. that particular formula for cover is quite a big range, so that's a trade-off.

I do have to ask myself if counters and hexes is the way to go in the first place... not sure I see a way around that, though.

I'll have to see if there's a novel way to go about using them.

Syndicate content


forum | by Dr. Radut