Logo Platform
logo amplifiers simplified

Solutions to race conditions

Reply
Copied to clipboard!
10 years ago
May 7, 2015, 4:51:07 PM
Endless Legend uses simultaneous turns-- which is a good thing, it allows the game to proceed at a reasonable pace. However, it also introduces some situations where the player that acts first (or last) gets some advantage. Based on Amplitude statements regarding turn-based and twitch gaming, I don't think this was desired. Situations where it's advantageous to act last can stalemate untimed games or games using last-player timers. Luckily, solutions exist!



Problem: One army is retreating from another army. Whoever clicks first determines whether the aggressive army will catch up to the retreating army. Each player spams their clicks while the game is incrementing the turn. Host has an advantage due to network latency.



Solution: EL already has a mechanism for queued movement, which occurs at the end of the turn. Rather than having queued movement occur at the end of a turn, have it occur at the beginning of a turn. Make sure that you can unqueue movement by right clicking on the selected unit (which right now doesn't work). Use the RNG to determine the order with which armies undergo this queued movement (at a rate similar to the AI's movements, such that a retreating unit with a tile between it and an aggressor and with higher MP than the aggressor will always escape).



Problem: A player moves into a second player's territory. The second player closes borders. The following turn, this teleports the first player's army out of the closed territory, using up all of their movement. This encourages the second player to act as late as possible in order to deny the first player the chance to move his army out of the territory and preserve its movement points on the following turn.



Problem: A player declares war and invades a Drakken player. The Drakken player has enough influence to force truce and close borders, but only once. It's in the Drakken player's interests to have this action occur as late as possible in the turn so that the the first player cannot re-declare war and nullify the close borders.



Solution: Make it so that most diplomatic treaties (peace, closed borders, truce) don't take effect until the following turn. Give the player facing closed borders a turn to move his units out of the closed territory before teleporting them.



Problem: Since manual combat takes longer than most timed turns, manual combat tends to prevent any actions later in the turn in timed games. This means that most conquered cities lose their entire production when conquered, that an early attack can deny an army's entire movement, and that territory can made functionally inaccessible (even to queuing extractors) by engaging in combat in that territory.



Solution: Implement discretionary time as suggested in this thread.
0Send private message
10 years ago
May 8, 2015, 11:11:29 AM
For your first solution I've definitely found myself mashing on the execute moves button at the start of turns. However, considering all of the other multiplayer issues, I don't think host advantage/twitch activity is enough of a problem to warrant the effort required to implement this (this beginning of turn moves would need to be handled with a different system). In addition there will always be race conditions (ex. two Settlers moving to settle the same spot) that would need to be resolved.



For the second item, I'm not sure the mechanics of Close Borders are that prone to abuse. Players need to account for this when running around another player's territory. That said, I don't see a problem with your suggestion and it always seems a bit strange how Diplomatic actions (including trades) took effect immediately. If I Close Borders (or whatever) this turn, the state should not change and the the other players shouldn't get the notification until the beginning of the next turn. If I negotiate a trade, I shouldn't get the stuff until the beginning of next turn. This would also help resolve silly (IMO) Diplomatic exchanges where players trade a bunch of countering Diplomatic actions (Close Borders/War/Force Truce/Close Borders/War etc.) in the same turn. Your change would always give a player spending smiley: empirepoint to Declare War at least one turn to do something. This could be a significant change to implement though.



I suspect this suggestion is born from frustration trying to get your hands on a Drakken player that is using Force Truce on you, which is a separate balance issue that needs to be addressed.



For the last one, I've used this tactic a while ago to slow down an invading army and it's frustrating when you can't move your armies because they are locked for the entire turn. The workaround is to use only "Last Player" timers so that there is always a window after PvP combats for a player to finish up. This may make the game longer vs Fixed/Per-City timers but addresses this concern and probably a good idea for serious/competitive games. I don't think using these add much more time to the game than your suggestion for "discretionary time"
0Send private message
10 years ago
May 8, 2015, 2:52:55 PM
Propbuddha wrote:
For your first solution I've definitely found myself mashing on the execute moves button at the start of turns. However, considering all of the other multiplayer issues, I don't think host advantage/twitch activity is enough of a problem to warrant the effort required to implement this (this beginning of turn moves would need to be handled with a different system). In addition there will always be race conditions (ex. two Settlers moving to settle the same spot) that would need to be resolved.




I'm not sure that it's a "different system" so much as changing when, in the turn, the system triggers. Multiturn settle actions already exist. Order of operations for simultaneously queued movement must already exist (for AI's purposes) and is hopefully random rather than alphabetical-by-faction or something else like that. The host advantage is less important than the fact that this is a "act-fast" situation which I believe Amplitude would prefer to avoid-- and which I think most players would prefer to avoid.



I suspect this suggestion is born from frustration trying to get your hands on a Drakken player that is using Force Truce on you, which is a separate balance issue that needs to be addressed.




I have to admit that the side-effects of this suggestion are appealing to me smiley: smile But I honestly dislike the fact that, as an invader, I'm encouraged to wait until the very last moment to redeclare war, engaging in a furious diplo-click with the Drakken only at the very end of the turn.



For the last one, I've used this tactic a while ago to slow down an invading army and it's frustrating when you can't move your armies because they are locked for the entire turn. The workaround is to use only "Last Player" timers so that there is always a window after PvP combats for a player to finish up. This may make the game longer vs Fixed/Per-City timers but addresses this concern and probably a good idea for serious/competitive games. I don't think using these add much more time to the game than your suggestion for "discretionary time"




I usually do use last-player timers, and they mitigate the issue, but I find that most players drop when their main army is destroyed rather than waiting for their last city to fall, and so cities always lose production (including buffered production, which, if I'm not mistaken, can be quite a lot, apparently by design).



The most frustrating situations, however, are due to AI/MF moves. Imagine a Dervish below half health. At the beginning of the turn, a pair of Harmonites spawn and attack the Dervish. Autoresolve is a clear loss for the RC player, but the Dervish can run circles around the Harmonites and then escape-- except if you resolve the combat manually, it takes all turn, and your Dervish never gets a chance to move, putting you in the exact same position at the beginning of the next turn.
0Send private message
10 years ago
May 8, 2015, 3:29:21 PM
natev wrote:
.. and so cities always lose production (including buffered production, which, if I'm not mistaken, can be quite a lot, apparently by design).




If the AI clears out the production queue when a player leaves it should definitely be fixed. The AI should respect the production and research queues when it takes over until they are empty. Even more important than the "quitter" situation is when a player gets disconnected by network/game bug.



natev wrote:
The most frustrating situations, however, are due to AI/MF moves. Imagine a Dervish below half health. At the beginning of the turn, a pair of Harmonites spawn and attack the Dervish. Autoresolve is a clear loss for the RC player, but the Dervish can run circles around the Harmonites and then escape-- except if you resolve the combat manually, it takes all turn, and your Dervish never gets a chance to move, putting you in the exact same position at the beginning of the next turn.




That's certainly frustrating, but ultimately it is you making a decision to prioritize micro-managing that combat vs. another player forcing it on you. If moving other armies out of the battlefield is important to you, you need to set the behavior to Defensive and take your chances with the auto-combat. For all Amplitude has done to streamline combat, it still sucks up the most time in MP matches and it's usually the guy insisting on running every combat manually (which I 100% agree is optimal) that everyone is waiting for. If this stuff really bugs you, you shouldn't be using timers at all...



Of course if the enhanced retreat feature we discussed is implemented, that Dervish should have a good chance of retreating from the Harmonites smiley: wink



There's still some room to speed up combats though:



[LIST=1]
  • A "super fast" combat speed that skips all movement/attack animations and teleports the units through their moves.
  • An option to let the AI take over and auto-combat the rest of the fight if you know you've won/lost.
  • Once the combat begins, allow the non-reinforcing armies to move out of the battlefield area

  • [/LIST]
    0Send private message
    10 years ago
    May 8, 2015, 3:42:49 PM
    Propbuddha wrote:
    If the AI clears out the production queue when a player leaves it should definitely be fixed. The AI should respect the production and research queues when it takes over until they are empty.




    That's not what I'm talking about. Even with last-player timers, combat takes longer than turns. If you're fighting another human (who hasn't yet hit next turn), you'll get your thirty seconds or whatever at the end of the fight-- the other player can't hit next turn while involved in the fight. But if you're fighting an AI controlled army/city, every other player is probably going to hit next turn during your combat, and the last player timer runs out during the combat. The instant you take the city, its production is cleared, but you have no opportunity to queue anything because the turn ends immediately, so the buffer clears. (Neither can you do any of the normal, quick city management you'd normally be capable of: moving that city's pop or destroying improvements that you find useless.)



    That's certainly frustrating, but ultimately it is you making a decision to prioritize micro-managing that combat vs. another player forcing it on you. If moving other armies out of the battlefield is important to you, you need to set the behavior to Defensive and take your chances with the auto-combat. For all Amplitude has done to streamline combat, it still sucks up the most time in MP matches and it's usually the guy insisting on running every combat manually (which I 100% agree is optimal) that everyone is waiting for. If this stuff really bugs you, you shouldn't be using timers at all...




    Except that a simple change can preserve game speed and eliminate the frustration. (Does auto-combat even respect behaviors? I didn't think it did, but I'll have to see. Edit: It does! Hey, that's cool to know.) Certainly, a well-designed "avoid" auto-resolve would be ideal for this particular situation, but I consider that to be something that would be handy in addition to dealing with situations created by timers, not something to be done instead, and it would require AI-style work, which Amplitude coders don't seem really excited about.



    • A "super fast" combat speed that skips all movement/attack animations and teleported the units through their moves.
    • An option would be to let the AI take over and auto-combat the rest of the fight if you know you've won/lost.





    Either of these would be pretty cool. Another thing that would be cool would be allowing orders to be assigned during each phase's resolution, which would let you eliminate the entire order phase.
    0Send private message
    10 years ago
    May 9, 2015, 6:10:56 AM
    I really would you like to know the views of the devs about these crucials problems, which need a lot of deep changings in the games.



    Game would be really better in multiplayer with these problems solved.
    0Send private message
    ?

    Click here to login

    Reply
    Comment

    Characters : 0
    No results
    0Send private message