Search Unity

Asynchronous PvP

Discussion in 'Game Design' started by khanstruct, Feb 7, 2015.

  1. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    I'm currently working on a multiplayer, 4X game (early design and prototyping stage), and I've been going back and forth with how I should handle PvP.

    The game is asynchronous. This means that players will never directly compete with each other in real time. They will setup their defenses, but when you attack another player, you will be battling AI. This raises a question with two possible answers... and lots of spin-off questions based on those answers.

    What happens when I attack a player who is online?

    SOLUTION A:
    The first answer, as many games of this sort do, is to not allow you to attack a player while they are online. This is the simple solution, of course. It allows us to reward the attacker with true percentages/amounts of loot based on what the defender actually has, etc., but has its own problems.

    For one, there are players who will remain online forever to avoid being attacked. Yes, you can automatically log them off due to inactivity, but then you have to worry about "auto-clickers". Sure, you'll have to worry about hacks and exploits regardless, but personally, I think these flaws pale in comparison to the other problem this presents...

    It completely segregates the game. Yes, it's asynchronous, but you still get the sense that you're playing WITH other people. If you take this very important interaction and only allow it when players are offline, you may as well be playing a single player game.

    SOLUTION B:
    The other solution is to carry on with the game as usual, then send the defender combat results after the battle has finished. This would obviously be more fun from a gameplay standpoint, but again, it has problems.

    If I steal resources from a player while I'm attacking them, what happens if they spend all those resources before the battle has finished? Other games have simply made these two resource pools exclusive from each other. This means that the attacker gets a certain amount of resources if they win, and the defender loses a certain percentage of resources, even though these amounts won't necessarily be the same.

    SOLUTION B.5:
    Another variation of this, is to allow the player to be attacked, but lock them out of that particular colony/city/planet, etc while the battle is commencing. I don't really like that idea, however, as players could launch attacks on someone and deliberately drag out battles to prevent the defender from ever playing (basically being griefer trolls).

    Now, personally, I'm leaning towards solution B, but I wanted to get some feedback. What do you guys think of these solutions? Have you seen any games that handle it differently? Any new thoughts on how it might be handled?

    Thanks!
     
    MrSecretMansion likes this.
  2. MrSecretMansion

    MrSecretMansion

    Joined:
    Nov 17, 2013
    Posts:
    113
    Maybe look at clash of clans, also not very relevant, but look at Real Racing 3 on the App Store it has a technology called Time Shifted Multiplayer, it may help with your project. Also, Boom Beach has an interesting multiplayer system but I don't fully understand how it works. You may want to take a look at that.
     
    khanstruct likes this.
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,464
    Seen how bloons monkey city does it?
     
    khanstruct likes this.
  4. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    Not familiar with how those work. I'll have a look. Thanks.
     
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    2,887
    Interesting challenge.

    Thinking as a player, I feel like I would want to be notified as soon as I'm being attacked. That seems better than getting a message "Hey, you were attacked and you lost. I'm taking some of your stuff". Even if I can't do anything about it, I'd prefer to know at the start. If it were possible for me to go in and WATCH the attack happening, even if I'm powerless to affect it, all the better.

    Now thinking from an engagement point of view, though, it's almost better to allow the defender the ability to affect the battle, at least a little bit. With the number of games available to players, you gotta do everything you can to keep 'em coming back to yours.

    So what if the player can deploy certain defenses in real-time. Nothing too powerful in themselves, but could turn the tide in a close outcome. For example, an area-of-effect bomb that can be deployed only once per battle (and maybe costs resources in between to charge back up), and you only get to use it if you sign in. Maybe the bomb can't even kill units, but can reduce their life by half so that their other units can finish them off.

    Makes sense if your game is timing-based at all, like if players are waiting on their buildings to finish constructing and have nothing to do until then. They sign off and go watch TV, only to get attacked, and now they have a reason to get back into your game for a few minutes. If your revenue model is ad-based, this is essential.

    Otherwise, solution B.5 could work if you put a time limit on the battle. As much as I hate everything else about the game, Clash of Clans has a really good system for handling attacking/defending.
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,457
    Timed might work. Get your stuff done, and commit to what you did. Wait for results. In cases like this I think it's better to go with what is easier to understand and simple. Make a simple 2 player thing, test it, is it fun?
     
  7. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    I have played some games where you have only a couple minutes to play out your attack, but that wouldn't work in this game. The combat is actually played out like X-Com, with turn-based squad movement, so I want to give players as much time as they need to play out their combat. Obviously, I don't want to inconvenience the defender while this is happening.

    I agree with hippo, it should be simple and straightforward. For instance, I would love to have true, synchronous PvP, but there are just too many complications that come with that in this particular game style.

    Good ideas, Schneider. Perhaps, instead of preventing attacks on online players, I could offer a simple response from them. If you attack an online player, and they click a button, a secondary type of defense will be active during the battle. More AI soldiers? Random landmines?

    Oftentimes, when attacking a player city, there will also be civilians that you can kill (which reduces the city's population). Perhaps, if the defender is online, there will be no civilians (the citizens were evacuated).

    Then I would likely go with solution B, keeping the Resources Stolen, and Resources Lost as two separate pools.
     
  8. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,464
    Sometimes all you can do is take revenge. Even if you take resources directly off a player, they will be more forgiving if you immediately allow them to strike back.

    A pacifist mode is also popular. If a player doesn't make any attacks for a number of days he cannot be attacked.
     
  9. khanstruct

    khanstruct

    Joined:
    Feb 11, 2011
    Posts:
    2,865
    Agreed, and, believe it or not, I'm actually not a huge fan of PvP games. However, I'm putting other game mechanics in to support the pacifist play-style. For instance, you can form Peace Treaties and Non-Aggression Pact. There can also be "laws" that discourage players from attacking significantly weaker locations. Additionally, I try to make it cost more to attack a low level area than the player would gain.
     
  10. Deleted User

    Deleted User

    Guest

    With solution B, as soon as the player is attacked, you could either immediately:
    1) debit the maximum amount of resources the attacker could win. At the end of the battle, you could credit back whatever the attacker could not win to the defender
    OR:
    2) lock the defender's resources so they cannot use their resources
     
    khanstruct likes this.