Do you understand synapse cover rules?

Chat about anything and everything Frozen Synapse

Moderator: Admins

What are cover-advantages like in the pictured situation?

Red has cover advantage
0
No votes
Green has cover advantage
34
63%
Both have equal cover
18
33%
No idea
2
4%
Something else
0
No votes
 
Total votes: 54
Lyx
Posts: 101
Joined: Sun Apr 18, 2010 4:28 pm

Do you understand synapse cover rules?

Post by Lyx » Mon Apr 26, 2010 10:54 pm

screenie_04.jpg
screenie_04.jpg (30.98 KiB) Viewed 6932 times

Voting results as of friday 2010-04-30:

24 (60%) players voted that the green unit has cover advantage
15 (38%) players voted that both have equal cover
1 (3%) player was unsure


_________________________________________________________________

Algorithms

I'll start off by trying to come up with all cover-algorithms which players may be assuming in a game like this.


A) DISTANCE TO NEAREST COVER

With the game-presentation being 2D, and it being boardgame-style, probably the first thing one would consider is the distance of a unit to its nearest cover in the line of fire. I suspect this is because its simple, requires little effort, and when moving own units, a frequent thought is "where are covers from which i can attack?". It's the easiest thing to consider: "Am i behind A COVER or not, and how much?".

Those reasons are the advantage of this algo: It's simple stupid, predictable and easy. The disadvantage of it is that it completely fails to account for multiple covers being in the line of fire - it only takes the nearest cover into account.

Because of this, probably no one uses this algo exclusively - many may however use it as an intuitive "quick check" for short distances.

According to this algo, Green would have cover advantage in the pictured situation.



B) WHO "HAS" THE MOST COVERS (ATOMIC QUANTITY)

A simplistic visual algo that can handle complex situations and long distances in the line of fire, is to simply "split" the line of fire in the middle, and then count the number of covers on each player's side. The advantage of this algo is that it is simple, requires little effort, can be done visually intuitively, and is perfectly accurate. The disadvantage is that it doesn't take balance of covers into account. More importantly, it ignores distance to the nearest cover (it therefore cant even handle 1-cover situations).

The later is a problem, because maps (and therefore also plans) are designed for people shooting at other people from positions behind cover. Thus it's implicitely assumed that if someone has taken position behind a cover, but another one hasn't (is metres away from his cover), the second unit loses - the pictured situation shows this quite well.

Since it ignores distance to nearest cover, it is also incompatible with algo A: Both algos can easily come to conflicting results.

Because of this, probably no one uses this algo exclusively - many may however use it as an intuitive "quick check" for long distance situations with multiple covers.

According to this algo, Both would have equal cover in the pictured situation.



C1) COVER-BALANCE WITH HIGH FIRSTCOVER WEIGHT

So now we have a chasm between short-distance single-cover, and long-distance multi-cover. Both from a topdown 2D boardgame perspective seem to matter - and yet, they can come to conflicting results. I suspect people who stay with the topdown 2D boardgame approach will intuitively try to find an algo that is a bit like a mix of A and B, but without the conflicts.

A complete solution to this dilemma and others is to simply imagine the line of fire as a balance, with the covers being weights on it, and then estimate if the balance significantly is tipped in one direction. However, at long distances this would mean that distance to the first cover becomes very unimportant, which may conflict too much with algo A and map/plan-design. Therefore, the player gives the first cover more weight.

The advantage of this algo is that it's still intuitively easy enough to imagine, fits the 2D boardgame visuals, is in line with map-design intentions, most of the time in line with algo A and algo B, and takes everything into account that until how has been mentioned. The disadvantage of it is that with complex situations, predictions become difficult and therefore testing is needed. Furthermore, players who prefer a completely different approach (which will be explained soon) won't like it.

According to this algo, Green would have cover advantage in the pictured situation.



C2) A + B

The difficulty of predicting complex situations can be brought down, by using a simplification of algo C1. We just look at distance to nearest cover, give this a score, look at how many covers are on each player's side, give this another score, and then add both together. The accuracy of this algo is a bit lower than C1, but it will in most cases come to the same conclusions. Such a more simplistic variant may be of advantage, because the player cannot predict scores in algo C1 precisely anyways, so the behaviour of algo C2 may be more in line with his expectations.



D) REALISTIC 3D FPS-STYLE

Now forget everything you've read so far. Geeks who are into simulation and maths will prefer a more realistic algo. Why more realistic? Well, the above mentioned algos actually have little to do with what would make sense if you could see the situation in 3D from a first person perspective. Neither the UI, nor the maps, are designed from that POV, but one may still prefer things to be realistic simply because one likes realism. For example, the longer the distance between both combatants is, the further away one of them could be from his nearest cover, without being at a significant disadvantage. The maths to compute this are actually simple if you know and understand them: You can calc it in your head abstractly if you know how, with high precision.

The advantage of this algo is that it's realistic and can be done accurately in your head (no testing needed then). The disadvantage is that it's not topdown 2D boardgame-style (the situation looks different on the screen, than it is), therefore cannot be done intuitively, ignores map-design intentions, and the involved maths aren't known by the majority of players.

According to this algo, Both would have equal cover in the pictured situation.

Synapse currently uses a realistic 3D FPS-style cover algo.


_________________________________________________________________


Synapse algo details & dev-intentions:

The following is part of a public discussion on synapse's IRC channel, between me and Ian:

Code: Select all

[08 Apr 10 15:53] * Omroth * here's how it works
[08 Apr 10 15:55] * Omroth * take a half height object between two units
[08 Apr 10 15:55] * Omroth * x  dx |  dy y
[08 Apr 10 15:55] * Omroth * dx is distance of x from wall
[08 Apr 10 15:55] * Omroth * dy is distance from y to wall
[08 Apr 10 15:55] * Omroth * d is distance between x and y
[08 Apr 10 15:56] * Lyx * (already suspects that it has to do with distance between x and y)
[08 Apr 10 15:56] * Omroth * if dx < 0.5 * dy
[08 Apr 10 15:56] * Omroth * ie, if the wall is less than a third of the way between them
[08 Apr 10 15:57] * Omroth * then that's cover value 1
[08 Apr 10 15:57] * Omroth * hold on
[08 Apr 10 15:57] * Omroth * this algo is complicated
[08 Apr 10 15:57] * Omroth * I'll upload it
[08 Apr 10 15:57] * Lyx * :)
[08 Apr 10 15:57] * Omroth * if (distanceFromMeToWall > 0.5 * distanceFromHimToWall)
[08 Apr 10 15:57] * Omroth * 				{
[08 Apr 10 15:57] * Omroth * 					F32 newMin = 0.3;
[08 Apr 10 15:57] * Omroth * 					if (distanceFromMeToWall > 2 * distanceFromHimToWall)
[08 Apr 10 15:58] * Omroth * newMin = 0.6;
[08 Apr 10 15:58] * Omroth * here, 0.3 is "cover val 1 (minor cover)"
[08 Apr 10 15:58] * Omroth * 0.6 is "cover val 2 (major cover)
[08 Apr 10 15:58] * Lyx * ah
[08 Apr 10 15:58] * Lyx * okay
[08 Apr 10 15:58] * Omroth * ok I remember
[08 Apr 10 15:58] * Omroth * if there is anything between you
[08 Apr 10 15:58] * Lyx * so it works on a relative scale
[08 Apr 10 15:58] * Omroth * then you are both at LEAST in cover 1
[08 Apr 10 15:59] * Omroth * if the wall is within a third of the total distance to you
[08 Apr 10 15:59] * Omroth * then you are in cover val 2
[08 Apr 10 15:59] * Omroth * right
[08 Apr 10 15:59] * Omroth * and the reason I did that
[08 Apr 10 15:59] * Omroth * is because it *is* relative, I think, in "real life"
[08 Apr 10 15:59] * Omroth * ie, how much of the enemy you can see
[08 Apr 10 15:59] * Omroth * is relative to both dx and d
[08 Apr 10 15:59] * Lyx * true
[08 Apr 10 16:00] * Omroth * if someone is a LONG way away, he can also be a fair way from cover, and still be "in" cover
[08 Apr 10 16:00] * Lyx * in a topdown tactical map however, its not so obvious
[08 Apr 10 16:00] * Omroth * yeah it's true
[08 Apr 10 16:00] * Lyx * there, players probably just compare:
[08 Apr 10 16:00] * Omroth * and in your example, green is on the very edge of cover
[08 Apr 10 16:00] * Omroth * as in, move him much back and he's in cover 1, not cover 2
[08 Apr 10 16:00] * Lyx * - who "has" the most walls (bias)
[08 Apr 10 16:00] * Lyx * - distance to nearest wall
[08 Apr 10 16:00] * Omroth * (/me is not talking about dungy nfl schemes :P)
[08 Apr 10 16:01] * Omroth * yeah
[08 Apr 10 16:01] * Omroth * I have to admit that I agree the one you sent me is confusing
[08 Apr 10 16:01] * Lyx * well, if it were 1st person perspective, it would probably work intuitive
[08 Apr 10 16:01] * Omroth * yeah
[08 Apr 10 16:02] * Omroth * ok, well I'll ruminate on this
[08 Apr 10 16:02] * Omroth * thanks for sending me a good example
Last edited by Lyx on Thu Apr 29, 2010 5:44 pm, edited 7 times in total.
Lyx
Posts: 101
Joined: Sun Apr 18, 2010 4:28 pm

Re: Do you understand synapse cover rules?

Post by Lyx » Wed Apr 28, 2010 8:28 pm

-
Lyx
Posts: 101
Joined: Sun Apr 18, 2010 4:28 pm

Re: Do you understand synapse cover rules?

Post by Lyx » Thu Apr 29, 2010 4:02 pm

No votes in the last 24hours, so i guess its okay to close voting a few hours early. First post updated with background details. Discussion welcome.
Lyx: "Wot? Why do i lose that one?"
Chem: " if(playerIsLyx()) chanceOfWinning *= 0.3f;"
Lyx: "Damnit om!"
User avatar
VexingVision
Posts: 98
Joined: Wed Apr 28, 2010 8:28 am
Location: Dublin, Ireland
Contact:

Re: Do you understand synapse cover rules?

Post by VexingVision » Thu Apr 29, 2010 4:46 pm

To simplify (unless I misunderstood it badly)

If a cover is closer to you than one third of the way between you and your enemy, you "claim" the cover-superiority from it.

In that case, neither red nor green have superiour cover, because both can claim one cover.


Unless I'm missing something?
User avatar
Lu-Tze
Posts: 42
Joined: Mon Apr 19, 2010 1:12 pm

Re: Do you understand synapse cover rules?

Post by Lu-Tze » Thu Apr 29, 2010 5:14 pm

"V" aiming should show you what amount of cover a unit at a particular place would be in. Colour code the line perhaps?
Image
Lyx
Posts: 101
Joined: Sun Apr 18, 2010 4:28 pm

Re: Do you understand synapse cover rules?

Post by Lyx » Thu Apr 29, 2010 6:10 pm

VexingVision wrote:To simplify (unless I misunderstood it badly)

If a cover is closer to you than one third of the way between you and your enemy, you "claim" the cover-superiority from it.

In that case, neither red nor green have superiour cover, because both can claim one cover.


Unless I'm missing something?
As i understand it, thats correct. The algo's workings aren't that different to algo B "Who 'has' the most covers", but with the important difference that only covers that are "near" (30%) to a unit are taken into account. This serves as a tiebreaker for 1-cover situations (in that case, only one of both is capable of claiming the cover). A welcome sideeffect of this may be, that covers which are "almost in the middle" are not taken into account, which makes it easier to visually predict. The algo intentionally shares the other disadvantages of the "Who 'has' the most covers"-algo in that it does not give the distance to the first cover higher weight (and thus results in situations as the one pictured at the beginning of the thread). The reason for why this was done, was realism from a 3D perspective.

You may wonder what would happen with the current algo, if distances become really small. Well, there is a minimum distance to cover cap - if a unit is closer than this to the cover, it doesnt matter, to prevent wall-hugging and make the algo more "tactical". From my experience however, the problem is that this minimum distance value is too small to fullfill its purpose - check this out:
screenie_06.jpg
screenie_06.jpg (24.22 KiB) Viewed 6735 times
Tactically, i guess we agree that both are behind cover equally. But if we look at the situation geometrically, we notice that the beam from the red unit to the begin of the box, is a bit shorter than the beam of the green unit to the box - along the line of fire. I'd say, the mentioned min-distance cap should prevent this - but apparently, it is so small that.... well, does it really matter anymore how tiny it is?
Lyx: "Wot? Why do i lose that one?"
Chem: " if(playerIsLyx()) chanceOfWinning *= 0.3f;"
Lyx: "Damnit om!"
Gnarf
Posts: 21
Joined: Thu Apr 22, 2010 6:58 pm

Re: Do you understand synapse cover rules?

Post by Gnarf » Thu Apr 29, 2010 6:54 pm

Lyx wrote:Tactically, i guess we agree that both are behind cover equally.
Nah. I think it looks like red has the better position.

And then there's a rather large difference in distance to cover, along the line of fire. Seems fine to me, really.
Logo
Posts: 37
Joined: Tue Apr 20, 2010 3:55 am

Re: Do you understand synapse cover rules?

Post by Logo » Thu Apr 29, 2010 7:22 pm

I don't see anything wrong with that example Lyx, red does appear to have the superior cover, even from a 3d viewpoint. At such a close range the little bit of space will help to expose more of green's body to red making green an easier target. Your point still seems valid to me; plenty of cases that should invoke the minimum distance rule may instead give the bonus to one side if the range is that short.

You have to imagine the units actually using the cover itself I think. At long distances the distance from cover to the unit doesn't really affect how much of the unit can be seen as you said. At short distances if red is looking over his cover exposing just his gun and body then he'd be a much smaller target than green would have to be to fire over the box at red because of his distance from the cover.

Draw it from a side view kinda like this: |-- | Where -- is cover and | = units. Draw a diagonal line from the top of one unit to the other so that it intersects with the corner of the cover, that represents the available cone of fire the unit has. The unit on the left, if his gun is help up to his head, can aim at something like 60-75% of the right unit while the right unit can only hit ~50-60% of the left. In a firefight the left unit can partially duck and expose less of himself while the unit on the right wouldn't be able to get down enough to take full cover. It seems natural that the left unit has the advantage even at a very close distance.
Last edited by Logo on Thu Apr 29, 2010 7:33 pm, edited 4 times in total.
Simulate: the answer to all of your problems.
User avatar
TheBeefiest
Posts: 214
Joined: Mon Apr 19, 2010 9:48 pm

Re: Do you understand synapse cover rules?

Post by TheBeefiest » Thu Apr 29, 2010 7:25 pm

I think i agree with gnarf on the table. Think of a desk, three pieces of wood, two short side walls (red is against one) and then there is a hollow area underneath. Green is against a hollow area, as well as an angled approach. However the game probably doesnt model that accurately.

So how does it model the tables/desks/bigger box covers? Just distance from centre unit to the first surface in firing line? IF it does this, then you could account for it as it is now, instead of engaging at that angle across the table you could try to approach closer to the corner, so he has the more obtuse firing angle in relation to the table, giving you the advantage.


A somewhat similar question i guess is how far past cover does ducking fully conceal someone? Does the thickness of cover affect this as well?
Lyx
Posts: 101
Joined: Sun Apr 18, 2010 4:28 pm

Re: Do you understand synapse cover rules?

Post by Lyx » Thu Apr 29, 2010 7:35 pm

Gnarf wrote:
Lyx wrote:Tactically, i guess we agree that both are behind cover equally.
Nah. I think it looks like red has the better position.

And then there's a rather large difference in distance to cover, along the line of fire.
Image
..Seems fine to me, really.
Thats because you're either an idiot, someone who just likes to play devils advocate, or a troll. I'm not sure which of those - hard to distinguish sometimes. No, i do not plan to apologize for this statement.

P.S.: For those idiots, who argue for realism over tactics.... if in your world, people are dots (thats how its measured), then you've lost contact to reality.
Last edited by Lyx on Thu Apr 29, 2010 7:42 pm, edited 1 time in total.
Lyx: "Wot? Why do i lose that one?"
Chem: " if(playerIsLyx()) chanceOfWinning *= 0.3f;"
Lyx: "Damnit om!"
Logo
Posts: 37
Joined: Tue Apr 20, 2010 3:55 am

Re: Do you understand synapse cover rules?

Post by Logo » Thu Apr 29, 2010 7:40 pm

Lyx wrote:
Gnarf wrote:
Lyx wrote:Tactically, i guess we agree that both are behind cover equally.
Nah. I think it looks like red has the better position.

And then there's a rather large difference in distance to cover, along the line of fire. Seems fine to me, really.
Thats because you're either an idiot, someone who just likes to play devils advocate, or a troll. I'm not sure which of those - hard to distinguish sometimes. No, i do not plan to apologize for this statement.
I don't see how that's the case, nor does anyone else apparently. The red unit has a lot of tactical options while the green unit is unable to use cover to avoid fire. Maybe at that close of range you assume your gunners are accurate enough to land their shots, but if you imagine them actually using the cover then red can offer a much smaller target while green can barely hide his body from being exposed.
Simulate: the answer to all of your problems.
User avatar
TheBeefiest
Posts: 214
Joined: Mon Apr 19, 2010 9:48 pm

Re: Do you understand synapse cover rules?

Post by TheBeefiest » Thu Apr 29, 2010 7:41 pm

Lyx wrote:
Gnarf wrote:
Lyx wrote:Tactically, i guess we agree that both are behind cover equally.
Nah. I think it looks like red has the better position.

And then there's a rather large difference in distance to cover, along the line of fire. Seems fine to me, really.
Thats because you're either an idiot, someone who just likes to play devils advocate, or a troll. I'm not sure which of those - hard to distinguish sometimes. No, i do not plan to apologize for this statement.
Harsh. I can think of a number of reasons he is totally correct about that. Try and balance a gun on a corner angled 60degrees or more away from you, compared to almost 90degrees right infront of you.


Hmm now we might all be confusing the original picture with the table picture now that I read the posts again.
Lyx
Posts: 101
Joined: Sun Apr 18, 2010 4:28 pm

Re: Do you understand synapse cover rules?

Post by Lyx » Thu Apr 29, 2010 7:46 pm

Well, fine, if you prefer to play a game with logically flawed rules, rather than a well balanced and intuitive game, then have fun in your defective worldview. I'm happily not gonna be part of it.
Lyx: "Wot? Why do i lose that one?"
Chem: " if(playerIsLyx()) chanceOfWinning *= 0.3f;"
Lyx: "Damnit om!"
Logo
Posts: 37
Joined: Tue Apr 20, 2010 3:55 am

Re: Do you understand synapse cover rules?

Post by Logo » Thu Apr 29, 2010 7:51 pm

I don't follow, it's realistic and intuitive. It's win-win. You could recreate the poll and probably get most people to tell you that red has the better cover. The game also thinks red has the better cover.

If green was closer to the corner (further up), visually the cover would look more even. In game rules the cover would be even, again expectations match the game rules.

How is this unintuitive?
Simulate: the answer to all of your problems.
User avatar
TheBeefiest
Posts: 214
Joined: Mon Apr 19, 2010 9:48 pm

Re: Do you understand synapse cover rules?

Post by TheBeefiest » Thu Apr 29, 2010 7:55 pm

You can't really call a beta unintuitive yet, maybe undocumented?
Post Reply