project-navigation
Personal tools

Author Topic: A better reaction fire system  (Read 24834 times)

Offline Rodmar

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
Re: A better reaction fire system
« Reply #15 on: September 06, 2016, 06:50:17 pm »
3.3 Any already TUs spent that are eligible for triggering reaction fire would count when a new unit acts inside an enemy field of view. Once the new unit starts acting (moving, firing, etc.), it wouldn't start at 0 TU but at a fraction of all the already TUs that have been spent before the enemy's eyes (e.g. 10% to 25% ?). This would somewhat address the concern of several units showing and acting in turn, as the last ones would be more prone to reaction fire than the first ones, because surprise effect would have been partly canceled. E.g. unit A enters field of view and acts without triggering RF because it only used 10 TUs; when unit B begins to act, it is considered as having already used say 1-3 TUs, and thus a 10 TUs real action would count as a 11-13 TUs virtual action. [...]
Quote from: Anton
The arbitrary percentage should be replaced with 100%, because the defender has all this time to a) notice motion at a specific location, b) look thither more intently and spot the enemy c) take aim, and d) shoot.
A necessary correction. Accumulating the time spent by units of the active team within the LOS of the reacting unit seems wrong because an event of an arbitrarily small duration is enough to alert the latter and cause him to aim in the direction in which he saw motion.
Now that I think again about this, it seems more evident to me that current model should be improved, even if this makes the game departing more from traditional TBS action games. While I'm not sure about, and I'm not committed with the above idea of mine, I want to elaborate better, in case it would be of some interest for this topic.

Currently:
1/ As long as no RF has triggered, the attacker's (moving player's) turn "looks" like simultaneous for a defender (not moving player) with reserved TUs. His RF capital is not spent at all. When RF triggers, some reserved TUs are spent and this is of sequential nature as far as next RF opportunity is considered. But thereafter, we return to a "simultaneous" phase until next RF triggers (during the same enemy move turn). I mean that obviously, as long as no RF occurs, the moving player do what he wants with his soldiers, and this is the model of such turn based action games.
2/ As for the attacker's point of view, time flows sequentially because next move order depends on what just happened during previous moves: spotted enemy, RF experienced, canceled move, ...).
3/ Hence, the idea is/was to introduce a kind of sequence from the defender's point of view, on top of the current RF spent TUs account.

Accounting for all the previous actions performed in LOS with a 100% weight may be too much, as you say, and 10%-25% is certainly not enough.

A 100 % weight probably would:
- leave few chances to the next to move soldier (as he would trigger certain RF);
- offer the same cheat option as currently, when a player may draw RF to a purposely heavily armored soldier (he would learn to know that with a new RF model without reseted TU each time LOS is lost, the second moving soldier would trigger RF, as accumulated TUs in LOS would grow steadily).

If we take a "4 TUs wide"-window as an example, and a "8 TUs RF mode"-weapon ready:
  • Currently, no RF is triggered ever because each passing-by soldier spends 4 TUs only while in LOS. A full squad may pass by the window to no consequence, as I pointed out.
  • With a 100% cumulative RF time, 1st passing-by soldier spends 4 TUs in LOS, and is unharmed, 2nd soldier spends 4 TUs for a cumulative 8 TUs in LOS, and triggers a RF. If not (border case?), 3rd soldier triggers RF, anyways.
  • With a 25% weight,
    - 1st soldier passes by the window unharmed.
    - 2nd soldier starts passing by the window as if he had already spent in LOS: not 0 TU (as currently), not 4 TUs (as with 100% case), but with 1 TU (4x0.25). Then he spends 4 TUs (for real) for a cumulative time of 5 TUs, not enough to trigger RF.
    - 3rd soldier starts passing by with 2 TUs (8x0.25) (not 0 nor 8 TUs). He's left unharmed because he ends his move in LOS with a cumulative 6 TUs.
    - 4th soldier is left unharmed (cumulative 7 TUs).
    - 5th soldier may trigger RF because he's still in LOS with 8 cumulative TUs.
In this example, it looks like a 25% weight is too small. Or not? Granted, a "4 TUs wide"-window is a small opportunity to pull the trigger of an assault rifle. Perhaps it's correct (or acceptable) that four soldiers may pass by unharmed. If you take a "6 TUs wide"-passage on the other hand, 3rd soldier would trigger RF from an assault rifle (2x6x0.25 + 6 = 9).

As we see, it needs some tweaking and balancing between realism and  playability.
« Last Edit: September 06, 2016, 07:42:31 pm by Rodmar »

Anton

  • Guest
Re: A better reaction fire system
« Reply #16 on: September 18, 2016, 01:26:18 am »
Quote
1/ As long as no RF has triggered, the attacker's (moving player's) turn "looks" like simultaneous for a defender (not moving player) with reserved TUs. His RF capital is not spent at all. When RF triggers, some reserved TUs are spent and this is of sequential nature as far as next RF opportunity is considered. But thereafter, we return to a "simultaneous" phase until next RF triggers (during the same enemy move turn). I mean that obviously, as long as no RF occurs, the moving player do what he wants with his soldiers, and this is the model of such turn based action games.
2/ As for the attacker's point of view, time flows sequentially because next move order depends on what just happened during previous moves: spotted enemy, RF experienced, canceled move, ...).
3/Hence, the idea is/was to introduce a kind of sequence from the defender's point of view, on top of the current RF spent TUs account.
Well-observed.  This may serve as a basis for a mathematical model of time-accounting in turn-based games.
Quote
Accounting for all the previous actions performed in LOS with a 100% weight may be too much, as you say, and 10%-25% is certainly not enough.
I have read and understood your exposition of this system for 25% and 100%, but
note that in my previous post I had changed my mind about it and proposed an improvement of your idea which needs no such constant and emulates some situations with better realism, e.g.:
  • when the defender barely notices an enemy, which spends but few TUs in his view, and a considerable time later the same or another enemy appears at the same location. In your system the defender will have negligible advantage, while  in mine he will have had all the intervening time between the two events to aim and fire, as he would have had in reality.
  • when several the soldiers of the active player player line up before this "window" that the defender has covered (is aiming at) and all at once rush past it, no time should be accumulated, while in your system it is.

Have you decided on the specific detail that I asked of you two posts ago:
Quote
Another question that needs consideration is when exactly to reset the accumulated time. End-of-turn is clearly not enough: what if a distraction comes from another quarter from a different target? or from the same target from a slightly different position, e.g. left of a tree, then right of the same tree? And where is the exact boundary between a slightly and significantly different locations?
The devil dwells in details.

P.S. I feel this thread has drifted from my proposal to the discussion of yours. Would it be possible for you to create a specific thread for it and ask an administrator to move thither all the replies form this thread starting from, I think, reply #7? We shall continue our dialog in that new thread, while in this one I will post my revised system.

Offline TBeholder

  • Rookie
  • ***
  • Posts: 54
    • View Profile
Re: A better reaction fire system
« Reply #17 on: January 19, 2017, 09:37:40 am »
And the main drawback is called turn-based-ness. When one player is active the other is waiting for his turn. [...] To partially compensate for this effect was developed the so called reaction fire. [...] Also, reaction fire often used action points reserved from the active turn, so if someone was moving at his maximum speed, he couldn't react at all, which's ridiculous too.
It's a less-crude model of simultaneous actions. I.e. an actor who has no TU left at the end of turn already moved by, and will have time to "react" on that team's next turn. Someone with TU left waits in ambush, etc.

  • when several the soldiers of the active player player line up before this "window" that the defender has covered (is aiming at) and all at once rush past it, no time should be accumulated, while in your system it is.
  • [...]
    The devil dwells in details.
Generally if you need to track enemies separately, i.e. for the reacting side to "know" the individual enemies, something in the approach is already wrong.
But let's consider two situations that need to be fixed:
  • An enemy moves behind a thin column, then continues to move. The moment enemy was out of sight, the counter was reset, so moving past anything thicker than a lamp post makes the defender "forget" about the almost-shot-at enemy. Derp.
  • An enemy walks past a window, then another, then they go back, but the defender fails to do anything, because each individual enemy appears only for a moment. Derp.
How  to resolve these situations without tracking too many parameters?
Easy: do not just use a whole load of TU counters, aim - as an extension of half turn toward the target.
The result is that spent TU indeed add up:
A defending soldier sees an enemy moving, starts aiming there; when the enemy walks behind a single crate, stops aiming (or continues to "last seen", this could be variable too). The enemy walks from behind the crate in either direction - the defending soldier starts from where he stopped, not from the very start.
Obviously, not foolproof, but better.
But then you could cover specific areas and have variable reaction times:
A defending soldier already aims at the specific window where an enemy is expected to appear: reaction time is minimal, one step to walk in, another step- BANG, won't walk away. The same soldier covers the whole field of vision: reaction time is large, crossing a window or even a double doorway without being shot is quite possible.
This means breaking the shot TUs to components: weapon manoeuvrability rate * angle + minimum shot time + recovery / reload (i.e. a pump shotgun can be shot once fast, but the second shot isn't so fast).
A first approximation for this usually could be derived by conversion fromSnap shot time and  differences with Burst and Aim, if a weapon has all 3, and indeed may replace them as basic weapon properties (so that TU values as seen in the game are derived from them).

Anton

  • Guest
Re: A better reaction fire system
« Reply #18 on: February 04, 2017, 04:02:54 pm »
It's a less-crude model of simultaneous actions.
I.e. an actor who has no TU left at the end of turn already moved by, and will have time to "react" on that team's next turn. Someone with TU left waits in ambush, etc.
You were too brief, I didn't understand you :-)
  • when several the soldiers of the active player player line up before this "window" that the defender has covered (is aiming at) and all at once rush past it, no time should be accumulated, while in your system it is.
Generally if you need to track enemies separately, i.e. for the reacting side to "know" the individual enemies, something in the approach is already wrong.
But let's consider two situations that need to be fixed:
  • An enemy moves behind a thin column, then continues to move. The moment enemy was out of sight, the counter was reset, so moving past anything thicker than a lamp post makes the defender "forget" about the almost-shot-at enemy. Derp.
  • An enemy walks past a window, then another, then they go back, but the defender fails to do anything, because each individual enemy appears only for a moment. Derp.
The latter situation (of the window) is easier to handle because the location of the enemy, and the aiming direction for the reacting unit, is constant. It is already solved in my approach, wherein after a certain aiming time the reacting unit need only pull the trigger to make a shot. The exact time is then determined by the speed of the firer's reflexes, which in reality is about 225 ms on the average. If running past a window takes longer, one risks begin shot.

To summarize—in my system the first one or two units may go past the window unharmed, but the rest will be in danger. For more interesting gameplay, the game's parameters should be adjusted so that only fast gunslingers shall be able to shoot at an enemy running past a window. Slower ones shall only notice the enemy units, whereof the player should be notified when the previous half-turn is replayed for him.

About the first situation I have written as well:
what if a distraction comes from another quarter from a different target? or from the same target from a slightly different position, e.g. left of a tree, then right of the same tree? And where is the exact boundary between a slightly and significantly different locations?
But I have not yet solved it satisfactorily because of the said difficulties.  Let us look at your solutions:
How to resolve these situations without tracking too many parameters?
Easy: do not just use a whole load of TU counters, aim - as an extension of half turn toward the target.
The result is that spent TU indeed add up:
A defending soldier sees an enemy moving, starts aiming there; when the enemy walks behind a single crate, stops aiming (or continues to "last seen", this could be variable too). The enemy walks from behind the crate in either direction - the defending soldier starts from where he stopped, not from the very start.
Obviously, not foolproof, but better.
Indeed, but the firer must still react to the enemy's sudden appearance at one or the other side of the crate, so the shooting time may never decrease beyond a certain minimal duration, the mere reflex to pull the trigger upon sighting.

What if the enemy pauses behind the crate? The firer knows not either where or when to expect his reappearance, which increases the reaction time, but how to model that? A possible answer might be a special mode for "covering" a certain locaton, of which you wrote below. If one is aiming at the crate, shooting to the left or right of it should be faster than while aiming somewhere else or not aiming at all.

But then you could cover specific areas and have variable reaction times:
A defending soldier already aims at the specific window where an enemy is expected to appear: reaction time is minimal, one step to walk in, another step- BANG, won't walk away. The same soldier covers the whole field of vision: reaction time is large, crossing a window or even a double doorway without being shot is quite possible.
Exactly! This is how my system handles it:
The player may also want to "cover" a specific door or window without having his unit first "see" several enemies walk through the latter or past the former. For this I have suggested "focuses of attention", a means to specify a small area that a defender should guard instead of spreading his attention across the whole field of view, so as quicker to react to an enemy appearing within that area at the expense of a somewhat slower reaction to everything without it
This means breaking the shot TUs to components: weapon manoeuvrability rate * angle + minimum shot time + recovery / reload (i.e. a pump shotgun can be shot once fast, but the second shot isn't so fast).
Again, this is my view exactly, although I forgot about recovery in my model. See my post from the 3rd of September, 2016.

The first term need not be precisely proportional to the angle, but may be so approximated. The second term, your minimum shot time, I call precise aiming and consider it physically different from the first stage. The first is largely determined by the weapon's size and mass and the second by the skill of the shooter.

Note also that since recovery has only a limited effect on the weapon's alignment, subsequent shots may be made somewhat faster than the first one.

A first approximation for this usually could be derived by conversion fromSnap shot time and differences with Burst and Aim, if a weapon has all 3, and indeed may replace them as basic weapon properties (so that TU values as seen in the game are derived from them).
I doubt it, for you can't model the aiming process as having several stages based on a single TU value.

Also bear in mind the the TU's as used in the majority of TBSes including UFOAI are incompatible with any sensible model of reaction fire because one TU does not represent a constant duration but is specific for each unit. We cannot measure time or compare durations using this idiosynchratic unit and must replace it with a standard time unit. The same amount of TUs shall be given to each unit, but fast ones shall run the same distance or shoot the same weapons in less time, i.e. spending fewer TUs. This will require either a much-smaller duration of the standard TU (e.g. 1000 per turn) or fractional TUs.

Offline nick87720z

  • Rookie
  • ***
  • Posts: 43
    • View Profile
Re: A better reaction fire system
« Reply #19 on: July 07, 2017, 12:05:39 am »
Hello, i have ideas, which you might treat crazy, as they might need long work, but this might be just my opinion, so would be happy to see it discussed. The format below is somewhat machine/computer-like... hope, that doesn't make it less readable :)
Something might change during discussion... anyway...

More complex reaction, depending on mind:
    - Various differentiating levels, requiring proper mind level.
     Example levels (from lowes to highest):
        - humanoids and sheevar | spider | hovernet
        - taman | ortnok | sheevar
        - armored | unarmored kinds for taman and ortnok
        - light | heavy armor for taman and ortnok (or whoever yet)
        - standard | battle mods of hovernet and spider
        - The highest level 1: interactive reaction fire
         Possible order:
            - Each mode of each usable weapon, unit holds, must be enabled for reaction fire;
            - During enemy's turn - when unit appears in sight of soldier - time as usually is accumulated for reaction
             (accumulated time is displayed in unit's time bar), stopping for reaction requests in these cases:
                - Reacting player just accumulated enough time for next enabled reaction fire mode
                 Example: if player wields pistol and knife, reaction requests will happen on following time positions:
                    4 (knife stub) -> 6 (pistol quick shot) -> 8 (knife throw) -> 10 (pistol aimed shot or burst)
                Following cases - last warning, working if reaction time was not utilized when it could:
                - When reaction target is going to open fire (if it wants to shot plasma pisol burst,
                 its time will be added to reaction fire time reserve)
                - When target is moving towards cover and has remaining 1 tail to pass before it is in cover;
                 (in addition to marking RF iterrupted, it can also game mechanics may check alien's path
                 for such warning position and trigger warning reaction request when enemy is at it)
                Some examples:
                - sniper skipped snap shot, waiting for aimed, but enemy opens fire or about to hide too early - in shis case it can still do quick shot.
                - heavy MG-man, waiting for long burst, but forced to fire 5-round
                 (before taman will overkill him with long plasma burst)
        - Highest level 2: custom reaction
         Almost same, as level 1, but in critical situations (active unit is about to fire) passive unit may be allowed
         to do some limited set of other actions, guided by player or AI, spending accumulated time as it/he/she likes:
            - hide / unhide / grab / drop / reload weapon
             (if enemy has melee weapon, than there is enough time to even reload weapon,
             or e.g. at least take a knife to end it, if it is too impudent to still try to rush passive player)
            - some on-place movement actions - seat, stand, turn
             (e.g. soldier behind firebird wing, trying to shoot enemy on other side of wing,
             must seat, or bullet will be stoped by wing)
             (unsure about runing, as it may break some statics, thus becoming unacceptable)

Offline EvelynWilson

  • Cannon Fodder
  • **
  • Posts: 1
    • View Profile
Re: A better reaction fire system
« Reply #20 on: January 09, 2023, 10:50:19 pm »
Hello, i have ideas, which you might treat crazy, as they might need long work, but this might be just my opinion, so would be happy to see it discussed. The format below is what are moobs somewhat machine/computer-like... hope, that doesn't make it less readable :)
Something might change during discussion... anyway...

More complex reaction, depending on mind:
    - Various differentiating levels, requiring proper mind level.
     Example levels (from lowes to highest):
        - humanoids and sheevar | spider | hovernet
        - taman | ortnok | sheevar
        - armored | unarmored kinds for taman and ortnok
        - light | heavy armor for taman and ortnok (or whoever yet)
        - standard | battle mods of hovernet and spider
        - The highest level 1: interactive reaction fire
         Possible order:
            - Each mode of each usable weapon, unit holds, must be enabled for reaction fire;
            - During enemy's turn - when unit appears in sight of soldier - time as usually is accumulated for reaction
             (accumulated time is displayed in unit's time bar), stopping for reaction requests in these cases:
                - Reacting player just accumulated enough time for next enabled reaction fire mode
                 Example: if player wields pistol and knife, reaction requests will happen on following time positions:
                    4 (knife stub) -> 6 (pistol quick shot) -> 8 (knife throw) -> 10 (pistol aimed shot or burst)
                Following cases - last warning, working if reaction time was not utilized when it could:
                - When reaction target is going to open fire (if it wants to shot plasma pisol burst,
                 its time will be added to reaction fire time reserve)
                - When target is moving towards cover and has remaining 1 tail to pass before it is in cover;
                 (in addition to marking RF iterrupted, it can also game mechanics may check alien's path
                 for such warning position and trigger warning reaction request when enemy is at it)
                Some examples:
                - sniper skipped snap shot, waiting for aimed, but enemy opens fire or about to hide too early - in shis case it can still do quick shot.
                - heavy MG-man, waiting for long burst, but forced to fire 5-round
                 (before taman will overkill him with long plasma burst)
        - Highest level 2: custom reaction
         Almost same, as level 1, but in critical situations (active unit is about to fire) passive unit may be allowed
         to do some limited set of other actions, guided by player or AI, spending accumulated time as it/he/she likes:
            - hide / unhide / grab / drop / reload weapon
             (if enemy has melee weapon, than there is enough time to even reload weapon,
             or e.g. at least take a knife to end it, if it is too impudent to still try to rush passive player)
            - some on-place movement actions - seat, stand, turn
             (e.g. soldier behind firebird wing, trying to shoot enemy on other side of wing,
             must seat, or bullet will be stoped by wing)
             (unsure about runing, as it may break some statics, thus becoming unacceptable)

You are suggesting great ideas and what about your experience when you applied any one of these ideas in your practice? 
« Last Edit: January 29, 2023, 07:55:55 pm by EvelynWilson »