Recommend
4 
 Thumb up
 Hide
59 Posts
1 , 2 , 3  Next »   | 

Wargames» Forums » General

Subject: Hex-shaped range (in computer wargame) rss

Your Tags: Add tags
Popular Tags: [View All]
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb


I created the above image for some other bgg thread a long time ago, but I'm lazy and reuse it now, although one with a larger circle radius would serve my question better.

Question: In a computer game, you're not really restricted to counting ranges as number of hexes the way you do in a real boardgame, but it is trivial of course to have the computer calculate what hexes are within some specific range, to make it (more) circular.

I noticed that in all computer wargames I looked at (playing or just screenshots), when you have some aircraft or artillery unit with very large range, it looks very odd that the area you can reach is shaped like a large hexagon. Have no one used correct distances instead to make the area more circular? Of course in a small area (like that above) the difference isn't that big, but it looks rather silly in France '14 when your siege artillery units can reach some forts, but not others at about the same distance, simply because the shape of the area they can reach is a big hexagon, not a circle.

Actually I remember that in the boardgame Blood Bowl (Third Edition) you have a hex map but use a ruler to measure distances when throwing the ball. Never saw a wargame do that? But on the other hand I dislike rulers, so I don't mind that, but in a computer game you don't need the ruler. (EDIT: I looked at some photos and it seems like I remember it incorrectly. Blood Bowl uses a square grid not hexagons.)

Funny because the computer wargames often go to such lengths to do things "realistically", yet the artillery for some reason can fire way longer in some directions than in other directions.

Yes, someone will probably show me 20 games that do that already, but why isn't it more common?
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Also I have been thinking of ways to count movement points so that the areas a land unit can reach by moving is more circular. It's a bit tricker than with aircraft of course. But maybe you could count the number of steps going down-left vs up-right and multiply by some correction value (sort of like multiplying by 1.41 to get correct distances when moving diagonally on a square map)? Again not something I would like to do manually in a boardgame, but perhaps in a computer game. Anyone saw a game do that?

That's what the illustration above was for originally btw, to show that when you move to the left or right you don't get as far as moving up or down. But you all knew that, it was for some non-wargame thread.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Darrell Hanning
United States
Jacksonville
Florida
flag msg tools
badge
We will meet at the Hour of Scampering.
Avatar
mbmbmbmbmb
Quote:
Question: In a computer game, you're not really restricted to counting ranges as number of hexes the way you do in a real boardgame, but it is trivial of course to have the computer calculate what hexes are within some specific range, to make it (more) circular.

I'm sorry, what was the question?

Okay, seriously though - why would a programmer use the hex grid used for unit position and movement for computing distances for ranged weaponry, rather than absolute distances? I think I can give you three reasons.

1) First, because the user of the game is going to be placing his units based on distances figured by the hex grid - not by absolute distances. So, at that point the choice becomes one of user-friendliness. The alternative would be to inform the user - in the manual or tutorial - that each hex is (for example) 200 yards across the flats (or x.x from vertex to opposing vertex), and that the range of the artillery unit is 1100 yards, and leave him to try and keep his head above the math. Or, have the reachable hexes highlighted whenever a ranged unit moves - but this may not prove practical due to the interface employed, or for other reasons of visual functionality.

2) The second reason would be the programming involved. Is it possible to translate each unit's location on a known-scale hex grid into an absolute coordinate? Of course it is. But to the programmer in question, is it worth the extra effort (and storage space, RAM usage, and cycles used by the PC) just to provide this? In earlier days of programming, the RAM usage and cycles used were serious concerns; not so much, nowadays, granted.

3) Will the programmer(s) get paid the same amount, either way? Would the software be released by the deadline, either way? I don't like putting matters in such mundane terms, but that is how life works, so very often.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Marco
Germany
Kiel
flag msg tools
badge
Avatar
mbmbmbmbmb
If you want to perform more detailed range/movement calculations, why use a hex grid at all?

Using a circular representation for range calculations lead to a distorted area covered (in your example it takes 8 hexes to go south, but 9 to go southeast)
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Emanuele Vissani
Italy
Bologna
flag msg tools
mbmbmbmbmb
Tiruvor wrote:
If you want to perform more detailed range/movement calculations, why use a hex grid at all?

Using a circular representation for range calculations lead to a distorted area covered (in your example it takes 8 hexes to go south, but 9 to go southeast)

Exactly that. Using a circle area like the example would mean that a projectile would fly faster going east then if it goes south
This is in the hex grid nature, the zig-zag line in your example testifies that in all directions the distance you can cover is the same (if you use the hexagonal area)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Dorosh
Canada
Calgary
Alberta
flag msg tools
designer
publisher
badge
Tactical Wargamer's Journal
Avatar
mbmbmbmbmb
Subzer0 wrote:
Tiruvor wrote:
If you want to perform more detailed range/movement calculations, why use a hex grid at all?

Using a circular representation for range calculations lead to a distorted area covered (in your example it takes 8 hexes to go south, but 9 to go southeast)

Exactly that. Using a circle area like the example would mean that a projectile would fly faster going east then if it goes south
This is in the hex grid nature, the zig-zag line in your example testifies that in all directions the distance you can cover is the same (if you use the hexagonal area)

Are you using Mercator's Projection?
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Robert Stuart
United States
Los Alamos
New Mexico
flag msg tools
Avatar
mbmbmbmbmb
You have an excellent point. At short ranges hex distances more closely approximate circles than at long ranges. One way to correct this would be (shudder) to go back to squares, and to use the Pythagorean Theorem to calculate all ranges (it would be relatively easy to do on a square grid) -- unless, of course, you use a ruler or tape measure, which would give accurate ranges with equal facility no matter what the grid was.

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Emanuele Vissani
Italy
Bologna
flag msg tools
mbmbmbmbmb
bob_santafe wrote:
You have an excellent point. At short ranges hex distances more closely approximate circles than at long ranges. One way to correct this would be (shudder) to go back to squares, and to use the Pythagorean Theorem to calculate all ranges (it would be relatively easy to do on a square grid) -- unless, of course, you use a ruler or tape measure, which would give accurate ranges with equal facility no matter what the grid was.


With the square grid you go back to another big realism problem: if the squares have base 1, a diagonal move means traveling 1,41421...
that means that you travel faster going diagonally than going straight north for example


ok, you will start to hate me
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Kershaw
Ireland
Belfast
Northern Ireland
flag msg tools
designer
publisher
WARGAME!
badge
Lines of Battle: Quatre Bras 1815. Brunswick hussar.
Avatar
mbmbmbmbmb
You can always use area movement rather than hexes. Might lead to other problems though...

I thought about using trigonometry to calculate artillery fire ranges in my latest Android game (Quatre Bras), which uses area movement, but decided against it as Line of sight was far more important.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Subzer0 wrote:


With the square grid you go back to another big realism problem: if the squares have base 1, a diagonal move means traveling 1,41421...
that means that you travel faster going diagonally than going straight north for example

No, on a computer you could easily multiply movement costs by that too. In a boardgame you can multiply by 1.5. That makes movement speed almost perfectly in sync with pythagoras for calculating ranges.

Not that squares are perfect, especially not when you allow diagonal moves, plus it doesn't look very good.

Other things brought up here I will comment on later. Need some screenshots first.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jim F
United Kingdom
Birmingham
West Midlands
flag msg tools
You know with Hitler? the more I learn about that guy, the more I don't care for him
badge
contrarian
Avatar
mbmbmbmbmb
kerpob2 wrote:
You can always use area movement rather than hexes. Might lead to other problems though...

I thought about using trigonometry to calculate artillery fire ranges in my latest Android game (Quatre Bras), which uses area movement, but decided against it as Line of sight was far more important.

Quatre Bras! when might this be available?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Robert Stuart
United States
Los Alamos
New Mexico
flag msg tools
Avatar
mbmbmbmbmb
Subzer0 wrote:
bob_santafe wrote:
You have an excellent point. At short ranges hex distances more closely approximate circles than at long ranges. One way to correct this would be (shudder) to go back to squares, and to use the Pythagorean Theorem to calculate all ranges (it would be relatively easy to do on a square grid) -- unless, of course, you use a ruler or tape measure, which would give accurate ranges with equal facility no matter what the grid was.


With the square grid you go back to another big realism problem: if the squares have base 1, a diagonal move means traveling 1,41421...
that means that you travel faster going diagonally than going straight north for example


ok, you will start to hate me

No, no problem at all. A unit has, say, 6 movement points. It could move six square in a straight line, 4 squares diagonally, and so forth. Moving diagonally costs 1.4 movement points out of the 6. A knight's move would cost 2.3 movement points, a long knight's move 3.16 mps, & etc.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Robert Stuart
United States
Los Alamos
New Mexico
flag msg tools
Avatar
mbmbmbmbmb
pelni wrote:
Subzer0 wrote:


With the square grid you go back to another big realism problem: if the squares have base 1, a diagonal move means traveling 1,41421...
that means that you travel faster going diagonally than going straight north for example

No, on a computer you could easily multiply movement costs by that too. In a boardgame you can multiply by 1.5. That makes movement speed almost perfectly in sync with pythagoras for calculating ranges.

Not that squares are perfect, especially not when you allow diagonal moves, plus it doesn't look very good.

Other things brought up here I will comment on later. Need some screenshots first.

Incidentally, my 'Tactics III' remake of Tactics II (which, when I get one more play-test completed and the rules written, I'll make freely available on VASSAL), uses just that: 1.5 MPs for a diagonal move and 1/2 MP for a diagonal move along a road (road movement in Tactics II is three times faster than non-road movement).
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
DarrellKH wrote:

why would a programmer use the hex grid used for unit position and movement for computing distances for ranged weaponry, rather than absolute distances? I think I can give you three reasons.

1) First, because the user of the game is going to be placing his units based on distances figured by the hex grid - not by absolute distances. So, at that point the choice becomes one of user-friendliness.

Nope. This only makes a different for long ranges, at least the 8 hexes in my exemple (but even then only in small amounts!). It is not user-friendly to manually count out to 10+ hexes anyway, so a game should have a good way to calculate that for you and display in a friendly way, just as you don't count movement distances manually, you just let the computer highlight them for you.

Quote:
The second reason would be the programming involved. Is it possible to translate each unit's location on a known-scale hex grid into an absolute coordinate? Of course it is. But to the programmer in question, is it worth the extra effort (and storage space, RAM usage, and cycles used by the PC) just to provide this? In earlier days of programming, the RAM usage and cycles used were serious concerns; not so much, nowadays, granted.

Nope, this is trivial. In fact calculating the distance by counting hexes is a more complex problem really, especially before you figure out what coordinate system to use (not rows+columns that is, that makes it really awkward to do this calculation).

Quote:
3) Will the programmer(s) get paid the same amount, either way? Would the software be released by the deadline, either way? I don't like putting matters in such mundane terms, but that is how life works, so very often.

Don't get this. If the game is the same, but longer range artillery looks better (not like a large hexagon), and/or the area an air unit can fly to looks more like a circle, and the effort involved in programming is the same (it is) I don't see the problem? To be clear, I don't think it is a HUGE improvement either, more of a "could be nice, might scare away fewer hex-fanatics from the game".
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Tiruvor wrote:
If you want to perform more detailed range/movement calculations, why use a hex grid at all?

I like hexes. They are user-friendly to begin with. I can see, for short movement/fire ranges, immediately how far away things are and roughly how far I can move, there are no "ruler-problems" with exactly how many pixels a unit will have moved after a turn (similar to free-movement miniatures games).

Quote:
Using a circular representation for range calculations lead to a distorted area covered (in your example it takes 8 hexes to go south, but 9 to go southeast)

Well, no. Movement, for land units, will not really be affected, as it is so small relative to the ranges that are affected by this (if not, maybe it is the wrong game to apply this to!).

Besides, a hex map is always distorted. You can't get away from that. Movement to the left/right will be shorter than up/down (or vice versa, if the grid is the other direction). If you try to correct that by squeezing the terrain a bit (I tried it!) then suddenly going in some other directions will be faster/slower. No matter how you do there will be directions in which movement/fire are wrong. I hope most designers realize this, because on a large hex map the effect can cause movement (say to Stalingrad from Berlin) to take a few more turns than it ought to take, compared to moving North-South. That's one reason to fudge maps a bit by moving features around reather than just super-imposing a grid on a pretty map (although a topic for another thread...).

My idea is simply how to make the target area look better. It's not going to make the distortion any worse (but slightly better actually; at least the long-range air/artillery will be somewhat more correct relative to the historic map, and the short-range land units will not be affected).
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Subzer0 wrote:

Exactly that. Using a circle area like the example would mean that a projectile would fly faster going east then if it goes south
This is in the hex grid nature, the zig-zag line in your example testifies that in all directions the distance you can cover is the same (if you use the hexagonal area)

Nope, you got it the wrong way around. In any tactical hex map wargame you have, a gun will fire longer to the east than to the south (or vice versa), because of the hexagons. That is just as if you had squares and allowed the gun to fire diagonally without correcting for that (ie counting a diagonal move as 1), it would be able to fire further to the southeast than to the south or east. The effect is smaller though, so I don't think any game correct for it. HOWEVER if you used a ruler, a circular range like I describe above, then the fire will be correct in all direction.

It is the movement of units that would still be distorted, the gun range would be correct (unlike otherwise when both are distorted).

If that is better or worse is sort of what I wanted to hear about.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Here is Big Bertha in France '14, with a range of 12 or something (again, I can't be bothered to count manually that far ):



Pretty? Not really. Not that it bothers me too much, being so used to it from many other games.

Notice how, if the range was correct, it would be able to fire one more Belgian fort before being forced to move (and it takes several turns to move a big gun and set it up again in this game):



Of course the effect increases with range. This is still relatively minor.

EDIT: Haha. Sorry, I was a bit too optimistic here. The range circle should go through the center of the "corner", not the outside of it, to be fair. Might not reach that fort then as I thought. Should have moved the artillery down a hex before taking the screenshot. Will not bother to fix that.

On shorter ranges though, there is no difference, and land units are so affected by terrain that you usually can't see this effect.



Now if you CAN see the effect, and it bothers you (or you just think it is wrong that the guns can have the correct ranges, while movement is still incorrect), as I mentioned in my second post above, I'm sure you could figure out some correction value (just like multiplying diagonal square movement with 1.41) so that movement is also corrected in a similar way (so in very open terrain the area a unit can reach would look more like a circle, and in other terrain it would probably not make much difference.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ryan Powers
United States
Marble
Minnesota
flag msg tools
badge
Avatar
mbmbmbmbmb
pelni wrote:

If that is better or worse is sort of what I wanted to hear about.

As far as I'm concerned, one being distorted and one not (either way) is worse than both being distorted. At least in the latter case they;'re not distorted relative to each other.

For example, using small movement #s in hexes, big firing range #s in circles:

Sure the firing range is arguably "more correct," but because the movement is not similarly "correct" artillery is still more useful in some directions than others even with the "correct" circular range. Why? Because from some directions the distortion of the hex grid means that a unit is under fire for long than from other directions.

End result: you're firing ranges/effectiveness are still distorted by the hex grid even though you're using circles, that distortion is just somewhat "hidden."

Thus my "both or neither" take on hexes or circles. You're not really removing the distortion. You're just hiding it.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ryan Powers
United States
Marble
Minnesota
flag msg tools
badge
Avatar
mbmbmbmbmb
pelni wrote:

Now if you CAN see the effect, and it bothers you (or you just think it is wrong that the guns can have the correct ranges, while movement is still incorrect), as I mentioned in my second post above, I'm sure you could figure out some correction value (just like multiplying diagonal square movement with 1.41) so that movement is also corrected in a similar way (so in very open terrain the area a unit can reach would look more like a circle, and in other terrain it would probably not make much difference.

By the time you are fixing *both* on a computer, just fix them and dump the hexes. You're no longer really using them anyhow.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Emanuele Vissani
Italy
Bologna
flag msg tools
mbmbmbmbmb
pelni wrote:

It is the movement of units that would still be distorted, the gun range would be correct (unlike otherwise when both are distorted).

This is the point: I think since the movement is distorted, range has to be too. Why should a unit be able to escape the gun range going in one direction, but not going in another?

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
keethrax wrote:
pelni wrote:

Now if you CAN see the effect, and it bothers you (or you just think it is wrong that the guns can have the correct ranges, while movement is still incorrect), as I mentioned in my second post above, I'm sure you could figure out some correction value (just like multiplying diagonal square movement with 1.41) so that movement is also corrected in a similar way (so in very open terrain the area a unit can reach would look more like a circle, and in other terrain it would probably not make much difference.

By the time you are fixing *both* on a computer, just fix them and dump the hexes. You're no longer actually using them anyhow.

I am. Units still move in fixed distances.

It would be exactly like a game that is correcting for diagonal moves by multiplying with 1.41 (or 1.5). Are you saying that such a game is not based on square tiles? Do you think it is a bad idea to do so?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Subzer0 wrote:
pelni wrote:

It is the movement of units that would still be distorted, the gun range would be correct (unlike otherwise when both are distorted).

This is the point: I think since the movement is distorted, range has to be too. Why should a unit be able to escape the gun range going in one direction, but not going in another?


Well, it is usually the case that you can escape in one direction but not the other.

I see what you mean though. As I said, it is unlikely to have an effect. To notice this the unit would have to be standing in a big open field, next to the enemy gun, and run 8 or so hexes in some direction (at shorter distances the error is not big enough to have an effect). I don't think it is a very good game if it let's you do that anyway. As soon as there is terrain (to slow movement in some directions) or the range is shorter or the unit is further away from the artillery unit this will not be an issue.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ryan Powers
United States
Marble
Minnesota
flag msg tools
badge
Avatar
mbmbmbmbmb
pelni wrote:

I am. Units still move in fixed distances.

By not using them in a simple counting manner for either movement or firing range, what have you gained by having them present at all?

What's their purpose once they're no longer providing countable distances?

You're avoiding using them in a user friendly manner for distance calculations. SO all I see them doing is arbitrarily forcing terrain to conform to a grid that has no longer has anything to do with the rest of the system.

Use them, or dump them. Either can be a good choice. A compromise gives you the worst of both worlds.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
The way I see it is more like using relativistic physics to do calculations on some high-energy particle vs using it to calculate how far you can throw a hand grenade. In one calculation it makes a difference, and you can make it more correct by using a bit of maths. In the other calculation it doesn't matter anyway.

Ground-units are affected, if you count over several turns, moving from one end of a big map to the other, but I see that as a different problem, and to me it doesn't really clash with making the range of air/artillery look better.

Or so I think. I probably spent a total of 30 minutes at most thinking about this. It's not like it is important. I wrote too much on the subject already, as always.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pelle Nilsson
Sweden
Linköping
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
keethrax wrote:

What's their purpose once they're no longer providing countable distances?

They allow you to simply say "this hex is forest terrain", "these units are in the same hex", "these units are in an adjacent hex and thus allowed to attack", "the ZOC of that unit goes into those hexes", "the bridge is between those two hexes". Movement options and attack targets can be highlighted by hex, not some irregular areas.

There are probably many more reasons, before I even get to mentioning how much easier programming the game is when you have a grid.

I never liked free-movement games, on a computer or table, and I don't think this changes that in any way, more than how calculating diagonal moves on a square grid as 1.5 makes me think that the squares are suddenly useless.

Plus, again, for movement it would have very little effect. I guess at the end of movement you could store the current "offset" of the unit, if it was moving to the east say, so that after a few turns it could gain an extra hex movement in that direction, which is all the effect it would have, except in a tactical game with a half-track that flies around the map 20 movement points per turn of course.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2 , 3  Next »   |