   Dealing with scripted events in a cooperative Action RPG
  I'm having trouble finding a seamless solution for a problem with scripted events. The core of the problem is how to let two networked co-op players share involvement in the scripted events without one player's actions disrupting his partner's gameplay. It'll be more apparent what I mean by this when you read on. Hopefully I can generate some discussion and eventually come to a conclusion.Imagine a typical 2D Action RPG. Some of the common events are difficult to translate into a co-op game. Some examples:- You talk to an NPC, and while engaged in conversation, you can't walk around until the conversation ends and the message box closes. This is normal and perfectly fine with 1 player, but what about the co-op partner in this scenario? Does he miss out on the dialogue which could be important to the game's plot? Does his character suddenly stop what he's doing every time his partner talks to an NPC so that both players can go through the dialogue?- If one player is in a conversation, what if his partner meets an enemy and engages in combat? Is the player in conversation now vulnerable to attack without being able to defend himself? Does his conversation (which might be important to the plot) end abruptly so that he can fight? Is the player in conversation safe from any attack and artificially isolated from the combat going on around him?These are just two examples of how it's difficult to create a co-op version of a typically single player experience. I probably need to change some of my scripted event mechanics (dialogue, cutscenes, buying/selling from shops) in order to have seamless transitions between the game's different activities (dialogue, combat, mini-games, etc). Perhaps players should be able to walk around and perform any of their regular actions simultaneously with dialogue?I read this forum every day so I know it's a good place to get some fresh opinions. I'm obviously very close to the project so if I was ambiguous at all about how anything works, please ask and I'll specify.   
Quote:You talk to an NPC, and while engaged in conversation, you can't walk around until the conversation ends and the message box closes.  This is normal and perfectly fine with 1 player, but what about the co-op partner in this scenario?You could possibly give the other partner the option to engage in the conversation or not.  If the player does do so, then create a sort of multi-dialogue system.  Where both players can engage in the conversation.  You could handle this by having the scripted responses show up for both characters.  When one character uses a response then remove that from the overall list of questions for the other player.  If it is a important conversation that deals specifically with the plot, then force both players attention to the conversation.  This way players will know whether they need to converse from the onset of the conversation.  This may not be as seamless as you might want, but I think it could be a pretty good compromise. Quote:If one player is in a conversation, what if his partner meets an enemy and engages in combat? Is the player in conversation now vulnerable to attack without being able to defend himself? First for important dialogue, if you force both players to conversate you will not run into a situation that the characters miss important plot points.  For other situations you could just script dialogue that will automatically end in case of attack.  For example, the player character may see his or her partner under duress and cut the conversation short.  You could also use the NPC to do this.  It may even be better to combine these two in order to reduce repetitive behavior. Quote:Perhaps players should be able to walk around and perform any of their regular actions simultaneously with dialogue?I think this could be useful for non-important short conversations.  You can allow the conversation to occur in real-time on each player's screen.  The player who finds it useful will read it and those who do not won't.   ;  Thanks, you've given me some good ideas that I'm definitely incorporating. Here's how I think I'll go about it:When someone is talking, a conversation bubble icon shows up above their character. If you're the one in the conversation, the bubble automatically expands and fills with the dialogue, but if you're not the one in conversation, you have the option of clicking the bubble icon to expand and read it. So moving through dialogues will now use the mouse, while both players can still use the keyboard to move around regardless of whether they're in dialogue or not. For unimportant conversations, if you walk too far from the conversee, the conversation just ends gracefully... although it makes your character look pretty rude ;)For important conversations that are central to the plot, the movement keys are blocked and the conversation bubble automatically expands for both players.   ;  If you need ideas for doing a 2D co-op RPG, playing Baldur's Gate, Baldur's Gate 2, or Icewind Dale would be a good start.For your example, dialogue, they stop both characters and the person who started the dialogue moves through it while the other player watches. Other games handle it the same way (Champions of Norrath: Return to Arms for example.) But, when it comes to things like shopping one player can shop while the other moves about (it stops both players for the dialogue, but it once the shopper actually goes into the shop screen, the other player can resume moving.) However it'll pull the shopper out of the shop screen the other player talks to someone (and I believe it does so when combat starts as well; not positive though.)IMHO I would handle things a little differently. I would make the players more like 2 entities in the world rather than 2 players in the game. Meaning that they could interact totally independant of each-other (talk to different people and what-not.) If you're worried about one player missing out on something, use a journal or message log of some sort (Baldur's Gate used a central chat-like window where all of the messages in the game were displayed so that you could go back and review them. It had a maximum of like 150 lines or so.) If Player B feels like being dumb and wandering off while Player A is talking, then that's his own fault [lol].Edit: Oh, another good example would be Diablo 2 (during online play.)Edit 2: Nevermind, I like your current plan of action.HTH!   ;  That was the most annoying part of baldurs gate imo. I wouldn't enjoy a game that forced me to stop and watch my party member converse. Broadcast what is said in the area so that if I'm interested in the conversation I can simply stand nearby and read what is said, but blocking my view and interaction with a dialog that I cannot do anything with anyways is frustrating. I believe most of the NPC's in NWN worked like that, though it's been a while.   ;  The player engaged in conversation can break away whenever he feels:NPC: "..and so the hypnotic crystal yo-yo of death was..."PC : "Hold on theres a gigantic radioactive rat approaching"*slicey-slice*PC : "You were saying?"*NPC resumes or starts conversation over*Players not engaged in conversation see dialogue on screen if they are near with option to ignore (remove from screen) what is going on.Why would life-threatening cicumstances coincide with important NPC dialogue.  Wouldnt the NPC be running away?Walking around while engaged in dialogue doesnt make sense   ;Quote:Original post by Programmer16If you need ideas for doing a 2D co-op RPG, playing Baldur's Gate, Baldur's Gate 2, or Icewind Dale would be a good start.Thanks, I'll check each of those out.Quote:Original post by DrEvilblocking my view and interaction with a dialog that I cannot do anything with anyways is frustrating.I agree completely. The dialogue bubbles will have transparent backgrounds which should help with the view blocking, but blocking interaction is tough to get around since the players' do need to be able to click on the bubbles to advance them. Perhaps a little X in the corner of the bubbles will suffice if the player wants to prematurely end the conversation without having to walk away (the X would be disabled for important dialogues).This may seem like a lot of effort being put into something as minor as quickly escaping dialogues, but parts of the game will be fast paced. The plan is to really put the "action" in "action RPG" ;)Quote:Original post by NoPancakeMixThe player engaged in conversation can break away whenever he feels:NPC: "..and so the hypnotic crystal yo-yo of death was..."PC : "Hold on theres a gigantic radioactive rat approaching"*slicey-slice*PC : "You were saying?"*NPC resumes or starts conversation over*An amusing way to look at it, but not necessarily a problem considering the liberties that have been taken in the past with NPC conversations... the way they churn out one-liners, the way some games don't even show the hero talking while the NPCs converse with him (ie Zelda games). If you can imply that a silent hero is actually talking for an entire game, can't you imply that the hero says "sorry, gotta run" when walking away from an NPC?Quote:Original post by NoPancakeMixWhy would life-threatening cicumstances coincide with important NPC dialogue.  Wouldnt the NPC be running away?An NPC could be an ally who fights with you, one who doesn't run away when danger strikes.Quote:Original post by NoPancakeMixWalking around while engaged in dialogue doesnt make senseIt makes more sense than unnecessary restrictions on the player, as far as I'm concerned.   ;  Doesn't Guild Wars have a solution for these topics?Quote:If one player is in a conversation, what if his partner meets an enemy and engages in combat? Is the player in conversation now vulnerable to attack without being able to defend himself?Does the "..now vulnerable" part imply they weren't prior?  If your buddy goes gallavanting around and tries to fight the dual blazing zweihander-wielding hobbit-o-doom all by his lonesome... well, hopefully he's up for it.  Not your problem if he gets himself a scratch.Game critical dialog and events can simply be cutscene'd so everyone sees it (a la Guild Wars).Quote:Walking around while engaged in dialogue doesnt make sense.I actually prefer it that way.  I have played several games where you might start talking to a character, realise they have nothing important to say and simply walk away - and their speech bubble just goes poof.  If you change your mind, just turn around and start chatting again.Quote:An NPC could be an ally who fights with you, one who doesn't run away when danger strikes.Regardless of how brave an NPC is, I doubt they'd happily continue their tyrade about how the local bartender owes him cash and oh by the way can you please fetch a dozen dizzleberries and a newborn bunny's eyeballs for his revenge potion, all whilst a giant salivating mutant chimp was charging in for the attack.That said, if you were chatting in said conversation, perhaps the NPC turns away from you (rather than the other way around) and gives the chimp the ole one-two right in the kisser.   ;Quote:Original post by spartanxQuote:If one player is in a conversation, what if his partner meets an enemy and engages in combat? Is the player in conversation now vulnerable to attack without being able to defend himself?Does the "..now vulnerable" part imply they weren't prior?  If your buddy goes gallavanting around and tries to fight the dual blazing zweihander-wielding hobbit-o-doom all by his lonesome... well, hopefully he's up for it.  Not your problem if he gets himself a scratch.Game critical dialog and events can simply be cutscene'd so everyone sees it (a la Guild Wars).Maybe I was a bit ambiguous. I didn't mean the partner necessarily went out looking for trouble; trouble could just as easily come to him. The point is that in a 1-player game, it's easy enough to design it so that no monsters can approach/attack your character while in conversation. But with 2 players, does one of them being in conversation mean no monsters can approach/attack him, or your entire party? Should your partner getting into a convo artificially halt any sense of danger you might feel until he's done? Or the converse, the player in conversation still has to worry about monsters approaching, but he can't move until the conversation ends (he's in quite a pickle). The other way to deal with it is to make the one person in conversation temporarily invincible, enemies wouldn't even see him or try to attack him. It could look odd having two carefree conversationists right next to someone fighting for his life.When you look at each case like this, you can see that with 2 players, you can't take liberties as easily; you can't pause some aspects of the game just because they aren't pertinent to Player 1 at the time. Player 2 might want to play the game while Player 1 is talking to an NPC.Granted this particular issue has been solved; now conversation never blocks the player's ability to move/act, unless it's a cutscene, in which we're back to the 1-player game scenario and it's easy to block monster encounters until control resumes.Quote:Original post by spartanxQuote:An NPC could be an ally who fights with you, one who doesn't run away when danger strikes.Regardless of how brave an NPC is, I doubt they'd happily continue their tyrade about how the local bartender owes him cash and oh by the way can you please fetch a dozen dizzleberries and a newborn bunny's eyeballs for his revenge potion, all whilst a giant salivating mutant chimp was charging in for the attack.That said, if you were chatting in said conversation, perhaps the NPC turns away from you (rather than the other way around) and gives the chimp the ole one-two right in the kisser.Please... let's give the game designer enough credit not to mix combat simultaneously with sidequest initiations. There likely won't be any monsters around in places where those sidequest NPCs are (towns, for example), just as any NPCs helping you dungeon crawl might have relevant things to say. Not all NPCs have to delegate ridiculous errands to you.And yeah, an NPC would also be free to move and attack while in conversation. Definitely good to have it work both ways.   ;Quote:...trouble could just as easily come to him.  The point is that in a 1-player game, it's easy enough to design it so that no monsters can approach/attack your character while in conversation.I presume you mean that his partner probably aggro'd a mob and politely brought it nearby?  That's the only way I can imagine the simple existance of a 2nd player causing the scenario...  Regardless, I'd reckon that if the conversationalist is oblivious and gets struck, the dialog should go poof - just as if he turned and started attacking the mob.  You could probably have the NPC take off as well, also interrupting the dialog.If you start playing with invincibility and nontargetability, your opening yourself to plenty of exploits, so you'd have to be rather careful.Basically, I don't think dialog should be modal gameplay.   