Hi all, you may find the following of interest...
Questions are welcome, though I am not sure someone ever reads this huge post...
//And sorry for my English
A System of a Tactical Turn-Based Game
Well, it's well known that turn-based games are great. The division of the in-game process into alternating turns, cyclically performed by the players, gave, first of all, the ability to play games requiring the player to control a complex system of interacting objects without hurry, allowing him to carefully analyze the situation before making any actions.
Second, the turn based system naturally allows for comfortable play of more than 1 players on the same machine, which is not used by many modern turn-based games for some reason.
And the main drawback is called turn-based-ness. When one player is active the other is waiting for his turn. In turn based tactics it yields unnaturally uneven gameplay, where the same situation can lead to totally different results if occurred in different turns, and even at different moments of a turn.
To partially compensate for this effect was developed the so called reaction fire. The units could act (often only make a limited number of shots) in the opponent's turn in reaction to certain events, mostly - spotting an enemy. In spite of the high non-symmetry of such system, in some games (X-COM 1,2) reaction fire occurred not every time it could happen, only part of possible reactions were realized. The chance for a given reaction (or opportunity) fire to happen was hard-coded or depended on the unit's reaction. This was an additional non-symmetry because in active phase units surely made a shot if
they'd been ordered to.
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.
So I decided to propose a better reaction fire system, which, being within the general frame of XCOM-like system, would be less prone to the indicated (and maybe some other) drawbacks.
First notes
Here I am based entirely on the following statement. Since turns are just a logical division of time, ideally, the outcome of any situation mustn't depend on in which turn it occurred and at what moment since the beginning of the turn.
First, my system has one global distinction from the XCOM-like RF-system: it doesn't feature saving time units for reaction. The reason's quite evident.
Let's consider the following situation from viewpoint of the XCOM-system. Unit A has taken position in a shed, taken aim at the entrance and saved say 24 time units for a snapshot. Then, an unwary unit B from the other team tries to enter through the door and... gets spotted by A.
In XCOM A will be given a chance to react, depending on A's reaction. The chance may also depend on the type of shot, B's reaction... - I don't know exactly. Anyway, once the chance is calculated, computer generates a random number and decides whether A can conduct reaction fire or not. If A is lucky, he'll make shot and kill B. Suppose, his snapshot costs 22 TUs, so A can't shot during the opponent's turn anymore. Thus, if enemy C sneaks along the wall and then rushes into the shed, A won't do anything. A has spent his TUs and now he can only stay motionless and watch C killing him.
Now, let's imagine the same situation with the only difference: at the beginning of his turn, A was closer to the shed, so when he entered it and turned around to face the entrance, there were 44 TUs at his disposal. Again, if he's quite lucky, he will kill B and still keep one reaction shot on hand. Now, C won't kill A so easy, because A will try to react for a second time (22+22=44)
But wait, the above two situations are different only within the XCOM turn-based system. In reality they'd be identical: A hides in the shed, B and C pursuit him, entering the shed one after another. And since our purpose is to make a more realistic turn-based system, here goes the first distinction:
In my system time units will not be saved for reaction. A unit will be able to react throughout all the opponent's turn irregardless of how many TU's he's spent in his preceding turn. And this is based on mere evidence: in real battle nobody stays quietly under fire because he's run out of his time units.
Thus, in my system units receive the same amount of TUs in the beginning of each turn, irregardless of whether it is their or the opponent's turn.
Another problem with that feature of XCOM system: the faster you move during your turn, the less TUs you have to react in the opponent's turn, and vice versa. Thus, if you run as fast as you can, you may be sure that if an enemy spots you in his turn, you won't be able to walk a couple steps or make a shot, how realistic! As you see, in XCOM the outcome highly depends on the way time is divided into turns and on the location of the moment on the time axis relative to the boundaries of the current turn.
Note, that the above proposal reduces this dependence: whenever reaction occurs, the unit will react the same way. Ok, we are moving in the right direction.
Now, another connected problem: in XCOM any action (a shot, for example) was located within one turn. You weren't able to start shooting in your turn and end in the next opponent's turn. This led to a ridiculous situation: if you had 23 TUs and your snapshot costed 24 TUs, you couldn't make a shot. 1 TU significantly effected the outcome, which, of course, is incorrect. So, the second rule reads:
New turn doesn't cancel actions started in the previous turn. Thus, however few TUs you have, you may spent them on anything you want. In this case your orders will be complete in the enemy's turn, and vice versa: unfinished reaction fire (or other reactions) will be accomplished in your next turn, if you don't cancel them.
All actions are performed at the expense of TUs the unit's been given for the current turn, so this "interturn" action spend the last TUs of one turn and the first TU's of the next one.
For example, you have 8 TUs and give a snap shot order, costing 20 TUs. In this case 8 TU's will be spent in your current turn, and, in the opponents turn, your unit'll spent the resting 12 TUs and take the shot.
This will make interturn transitions smoother and more realistic, because in reality there are no turns and no interturn boundaries.
But the opponent (in his turn) may escape your unit's LOS before he shoots. Yes, and in this case your unit shouldn't shoot. But TUs spent on aiming won't be reset. Your unit'll just stop aiming.
For example, in the opponent's turn you spent 10 TUs before you lost the enemy. But you needed 2 TUs more to shoot. In this case you don't shoot and your total TUs (for this turn) are decremented by 10.
Now you should have understood that in my system both your and the enemy's units can act simultaneously. Yes, it is true. And the turn defines only who can control his units (active turn) and can't (passive turn). The units of the latter player are controlled by their reaction instructions or they are finishing interturn actions.
N.B.: Reaction instructions are ones that define a unit's behavior during the opponent's turn. They are defined by players in their active turns. In case of interturn actions there are two choices:
1. Reaction first - when the interturn action is interrupted if reaction condition occurs.
2. Interturn action first - when the unit finishes his interturn action and only after that becomes ready to react.
Now, it's time to discuss the structure of the in-game time. We have simultaneous actions performed by both the sides (In XCOM the inactive side could perform only momentary action - reaction fire, which wasn't considered as having length), so there should be common time counter for the units of both teams.
Current time in my system is defined as the maximum number of TUs spent by the units of the active team.
Thus, all interturn actions of the passive team are synchronized with this parameter. Such structure allows for real simultaneity: for any given moment both teams have been acting for the same period of time.
Reactions will use a similar synchronization as well, but with a little modification. When a reaction begins (reaction condition's just been met), a snapshot of the active team is made: for each of the active team units their spent TUs are remembered S1,...Sn. T-parameter, time spent by the active team from the reacting unit's viewpoint, will now equal to the maximum of times spent by the active units since the "moment" of the snapshot (as the active units continue to act after the beginning of the reaction):
T=max{S'1-S1,...S'n-Sn}, where
S'i denotes TUs currently spent by the i-th unit of the active team (changes with time), while Si is the same value measured at the moment of the snapshot (it is constant for the given reaction).
EXAMPLE OF REACTION FIRE
Active team - A, it's units are A1, A2 and A3
Passive team - B, the units being B1 and B2
A2 goes into a shed (spends 24TUs), A1 turns round the corner and (spends 36 TUs) gets spotted by B1. (A3 hasn't moved) It takes B1 16 TUs to shoot. Now reaction will happen when:
[The snapshot in this situation is {36, 24, 0}]
1. The reacting unit is alive and has kept A1 in view since he saw him.
2. Unit A1 spends 36+16=52 TUs or A2 spends 24+16=40 TUs or A3 spends 0+16=16 TUs.
Once these conditions are met, the reaction is performed immediately.
Thus, not only A1, but also any his teammate will cause reaction by spending more than 16 TUs since the snapshot moment.
Also it may happen that B1 loses sight of the target before he can shoot. In this case the reaction doesn't occur.
Irregardless of whether the reaction took place or not, the unit stays able to react over the whole enemy's turn. But, of course, that doesn't imply he will fire at any incoming enemy. First, his reaction time may be too high (and the enemy will shoot him first). Second, he may be attacked by several units simultaneously (and, of course, he won't have time to make a shot at each of them). note, that in UFO the were no way to use simultaneity this way.
In my system it makes difference: whether a unit was attacked by several enemies at once or sequentially, which is also a serious improvement to realism compared to the XCOM-like RF-system.
How it looks in active turn:
Suppose you've encountered an enemy unit that is executing an interturn action - running to behind a tree. You give a snaphot order to your unit. In X-COM you unit would take a shot immediately on reception of the oreder. In my system nothing happens except the order is attached to the unit. That is, your unit has just starting to aim at the running enemy.
Now you can switch to other units. As the time spent by your team increases, the unit will take aim and shoot, unless the target kills him or escapes his viewfield before he has time to perform the shoot order.
... to be continued.