Author Topic: Attack Revealer  (Read 3437 times)

gameboy

  • Guest
Attack Revealer
« on: 2 March 2009, 06:01:00 »
Currently when a long ranged unit attacks a unit with lower LOS, the unit doesn't know who is attacking him and if it's the AI you can take out the unit before it realizes it's being attacked. In games like AOE and Rise of Nations, when a unit is being attacked by unit who is out of the respective unit's LOS the attacker is revealed. This does not happen in Glest and is very annoying.

modman

  • Guest
Re: Attack Revealer
« Reply #1 on: 3 March 2009, 02:46:13 »
This is more like a bug I think.

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Attack Revealer
« Reply #2 on: 3 March 2009, 18:44:36 »
If I'm not mistaken one of the changes in GAE was an attack notification when a unit would attack out of the sight radius  of the receiving unit, but it didn't always work.  I read about this months ago so I have no idea what became of it.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

modman

  • Guest
Re: Attack Revealer
« Reply #3 on: 4 March 2009, 01:59:20 »
This is different, because it was notifying you on the minimap, not the actual game portion.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Attack Revealer
« Reply #4 on: 4 March 2009, 15:49:39 »
Rather than revealing, wouldn't the unit run in the direction to find the attacker? Then once the attacker is in sight, it would be able to attack as normal?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Attack Revealer
« Reply #5 on: 4 March 2009, 17:07:19 »
Rather than revealing, wouldn't the unit run in the direction to find the attacker? Then once the attacker is in sight, it would be able to attack as normal?

I like that idea its realistic and seems to be easy to code ( dont know for sure because im not a programmer )
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

modman

  • Guest
Re: Attack Revealer
« Reply #6 on: 5 March 2009, 03:17:01 »
I would say it's not exceedingly hard because there aren't any complex conditions or anything like that.

daniel.santos

  • Guest
Re: Attack Revealer
« Reply #7 on: 27 March 2009, 00:28:29 »
hmm, can you create a saved game file that reproduces this?  Or even if you can come up with a set of steps to reproduce it (like specific units or something) and then open a bug for it.  I thought Martiño fixed this some time back and that that fix was in GAE.  The fix I seem to remember is that if a unit of faction A attacks a unit of faction B, but faction B cannot see the attacking unit then the attacking unit is revealed to faction B.  Now one thing I'm definitely seeing wrong here is that the attacked unit still doesn't necessarily respond -- that may be the issue?

assassin

  • Guest
Re: Attack Revealer
« Reply #8 on: 27 March 2009, 10:35:00 »
Yes

daniel.santos

  • Guest
Re: Attack Revealer
« Reply #9 on: 27 March 2009, 17:45:01 »
Well it may make sense to not allow the current behavior, but I do understand that is a unit's LOS is insufficient to retaliate, they only other alternative is for them to flee opposite the direction of attack, but only if they are idle.  If they are either guarding or patrolling, I don't think it would make sense then. To have them attempt to retaliate when they can't see their target and they can't calculate a path to it can lead them into a trap (e.g., a melee unit being attacked by a ranged unit from a vantage point that the melee unit can't reach them -- to attempt to retaliate in this scenario would spell near certain death)

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Attack Revealer
« Reply #10 on: 28 March 2009, 13:32:27 »
Now one thing I'm definitely seeing wrong here is that the attacked unit still doesn't necessarily respond -- that may be the issue?

I can confirm that this bug definitely exists in both Glest and GAE. I had major trouble when testing my dwarf faction because the dwarven warrior has a lower LOS than a tech archers range. Warriors would simply stand there and be arrowed to death unless I forced them to attack.  :(
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

daniel.santos

  • Guest
Re: Attack Revealer
« Reply #11 on: 28 March 2009, 22:49:57 »
Ok, I fixed this in 0.2.12, but of course, it's still experiencing the networking overhaul.  None the less, we should have a bug report for this if there isn't one already and I want to make sure it gets tested, etc.

The way I fixed it is that the attacked unit will flee to 1/4th of the distance between him and his attacker (in the opposite direction), or one space, whichever is greater (in case the guy being attacked is practically blind and 1/4th the distance wont result in any movement).  For comparison, when units that cannot attack auto-flee, they flee 2x the distance between them and their attacker.  I don't want such serious fleeing because these are units that can probably retaliate, they just can't see their attacker.  If they aren't fleeing far enough, we can change it to 1/2.