flareteam / flare-game

Fantasy action RPG using the FLARE engine
http://flarerpg.org/
Other
1.13k stars 237 forks source link

Click holding behaviour #786

Closed Simon-Charest closed 5 years ago

Simon-Charest commented 5 years ago

Issue: When clicking and holding unto an enemy, the character will keep on swinging / shooting. But when the enemy dies, the player must release the mouse button to be able to move again.

Possible solution: Killing an enemy should "release, click then hold" the button automatically (unless the player holds the Shift button). The character would start walking toward the pointer, without the need of releasing and clicking the mouse button again.

Reason: This would reduce the clunkiness when switching between the attacking and moving stances.

Note: this is the normal Diablo 1 behaviour.

dorkster commented 5 years ago

Pressing an attack key while moving will cause the player to stop moving and attack. So in your solution, we'd need to lock the attack button to keep the player moving. At which point, the player would then need to release the attack button if they want to start attacking again. Seems clunkier than what we already have.

The player can either move or attack, but not both at the same time. Attacking is always going to take priority, so it's hard to avoid needing to release the attack button if the player wants to move.

Simon-Charest commented 5 years ago

I'm using the "Diablo mode" where I move my character holding the left button, attack clicking and holding the left button over an enemy and cast spells clicking the right button.

What I meant is that, while I'm holding the left button, if I move my cursor over an enemy, my character will switch to attacking automatically. This is perfect. But once the enemy dies, I will need to release the mouse button and click again for my character to switch back to moving again. Otherwise, he will keep on attacking forever. This is the normal behaviour when holding the Shift button. But it should switch back to moving automatically toward the pointer, without the need to release the left click button.

I must admit that this is very specific to the "old Diablo 1 type" of controls I use while playing Flare.

dorkster commented 5 years ago

I'm using the "Diablo mode" where I move my character holding the left button, attack clicking and holding the left button over an enemy and cast spells clicking the right button.

As of yesterday, this has changed a bit (my above comment assumed you were using this behavior). So in Flare's current state, the player can keep the right mouse button pressed to move. If they attack, they only need to release the attack button to continue moving. If you are able/willing to build the latest engine from source, I suggest trying it out to see if it feels less awkward.

ate088 commented 5 years ago

Agreed with this. I am trying FLARE 1.08 and although it is a great improvement over the previous version, having to release the mouse button in order to stop attacking and start moving again makes the controls feel 'sticky'.

Simon-Charest commented 5 years ago

Exactly.

ate088 commented 5 years ago

Is there any way to do something like, left mouse button means attack as long as there are enemies in melee range, returns to being movement button if no enemies are in melee range?

dorkster commented 5 years ago

@ate088 Did you play with Flare 1.08.21? If not, you were still using the old mouse movement scheme. Left mouse is no longer used for movement and instead behaves just like when using regular keyboard movement. Right mouse is used for movement, and it will trigger the secondary power when Shift is pressed as well.

I like the way it is now, where there is a clean line between attacking and movement. I think the only change I'd consider making is if the player is attacking and not pressing the movement button(s), they could stop attacking completely and begin moving by pressing the movement buttons(s). That's pretty much how it works now, but because the player is holding the attack button, the movement state gets interrupted.

ate088 commented 5 years ago

Yes, the change is a bit of a hard sell for me personally. It means that, should I wish to spend most of my time playing the game with only the mouse (only occasionally reaching for the keyboard to pop a potion or something), I now have one skill that is even less accessible than before.

Take a look at the Diablo II Postmortem on Gamasutra here: http://www.gamasutra.com/view/feature/131533/postmortem_blizzards_diablo_ii.php?page=2

quote:

We strove to make the interface as transparent as possible. You want to open a door? Left-click on it. Want to move to a target location? Left-click on it. Want to attack a monster, pick up an item, or talk to a non-player character? Well, you get the idea. It's amazing how many games have different controls and key combination for all these actions when simpler is always better.

I guess ARPG players like myself take for granted the considerations and under-the-hood complexity needed to achieve such mechanical simplicity, but it is an interesting problem nonetheless. :)

dorkster commented 5 years ago

I've read that article before and I still don't entirely agree with Blizzard's decision on that control scheme. I mean, it's worked for them, but it kind of falls apart when the player wants to use the "one-holy-button" to do an action, but accidentally ends up triggering one of the many other actions. This could be because the player's aim was misplaced, or because the game's order of operation gave priority to one action over another. Blizzard's solution, like any solution, comes with its drawbacks. I know I've accidentally moved when trying to attack in Diablo. But Flare is not Diablo, so we have the opportunity to choose a different solution (and the drawbacks it brings).

For players that want to play purely with the mouse, they'll likely want to remap the other action bar items to the other available mouse buttons. Even on a 3-button mouse, binding a slot to middle mouse gives you two attacks. If the mouse has side buttons (or is one of those wacky MMO mice with a >10 buttons), that opens even more options that further mitigate losing a button for movement. Maybe I'm wrong, but I'd say that players that like playing games primarily with the mouse would invest in a mouse that has > 3 buttons.

ate088 commented 5 years ago

In Flare, you always can choose to leave the left mouse button empty if you want to keep movement and skill usage separate. The current setup simply forces that inconvenience on everyone.

dorkster commented 5 years ago

Okay, so how about as an Input option, we add "Attack enemy under move cursor"? This would behave like mouse movement attacking in 1.08 (albeit using the right mouse button power instead of the left). But there would be a few differences:

  1. We would have to calculate the effective range of ALL powers, not just melee powers. A problem with the 1.08 scheme was ranged users being out of, well, range. We should have a function able to determine if a power can reach a target by taking two coordinates and a power id.
  2. Upon attacking an enemy with this method, we lock the attack state. Instead of breaking out of the attack state if the cursor lands on empty ground, the attack state will only be broken when the initial target dies (or right mouse is released). This would allow the player to continually attack->move->attack without having to release the right mouse button. At the same time, they wouldn't risk moving out of an engagement because the cursor fell off their target.

Not my cup of tea, but it seems desired enough to warrant being an option. Would this make everyone happy? :smiley:

ate088 commented 5 years ago

IMO the most ideal would still be identical Diablo style movement/attacking, but thanks for considering our feedback :)

I don't disagree entirely with your reasoning, I have ran into the problem you mentioned before. I know many dedicated players remap their movement button to, like, '1' or something to mitigate that.

My worry is that Diablo-style movement has become such a basic 'quality-of-life' feature in games like this. Players would be thrown in for a loop if they are confronted with something that looks like Diablo, and clearly takes inspiration from Diablo, but functions entirely differently. It's a fact that every other ARPG from Path of Exile, to Torchlight, to Grim Dawn follows the basic control scheme that the very first Diablo game set out.

Would it be a lot of work to try auto-execute "release, click then hold" once all enemies in melee range are killed? It doesn't necessarily mean that FLARE-game needs to follow that, but I do think modders would love to have the option, you know?

Simon-Charest commented 5 years ago

I would even go as far as if a player clicks and hold the walk button on a tile that in blocked by enemy, the character should automatically attack that enemy until it is dead and then continue to move, without the need of clicking, holding, releasing upon kill, re-clicking and holding again to move. That would even be an improvement over Diablo.

ate088 commented 5 years ago

Hmm, I'm not very good at considering all the possibilities, but one possible hitch is what if players want to run away. Would "release, click then hold" suffice? Or would you need to shift-click to override it?

And if I wanted precision, FLARE's current WASD controls are honestly better than the all other Diablo likes already. I mean, have you tried stutter-stepping with WASD in FLARE? It's great. No other ARPG to my knowledge provides this.

Why not keep things accessible with Diablo-style mouse movement, and have WASD movement be something like ''expert mode" if you are going to have your other hand on the keyboard anyways?

Simon-Charest commented 5 years ago

Yes, release, click then hold would suffice to run, as long as you are not pointing over another enemy.

Yes, I've tried the basic Flare RPG controls and didn't like them. I would rather move and attack with the mouse and use extra items with the keyboard. I hate having to move my fingers all over the keyboard or having one hand over the other.

dorkster commented 5 years ago

@Simon-Charest My above suggestion would work pretty much how you describe. Diablo II almost worked like that, but only if the player starts moving with the right mouse before hovering over an enemy. I'd like the player to keep moving after if their initial action is right clicking on an enemy, and it sounds like that's what you want as well.

@ate088 As I mentioned, my above suggestion is very Diablo-like, with the exception that left mouse doesn't have similar move/attack behavior. Let's briefly review the left mouse behavior in D2: Left mouse moves the player, but doesn't break out if the player hovers over an enemy. If a player attacks with left click, they stop all actions once the enemy dies. Would you consider combined move/attack on left mouse essential to your wishes for Flare's mouse control scheme?

I personally don't like having multiple buttons for movement, rather having 1 mouse button to replace WASD. In Flare 1.08, left mouse was for movement, but right mouse behaved just like one of the numbered action slots. These are currently swapped since the right mouse button has less global duty, so there's less chance for action overlap. I'm okay with Diablo-like behavior on the movement button as an optional work-around for players that are strictly mouse-only, but only because there's no other way to access that power without using the keyboard.

ate088 commented 5 years ago

Hmm so if I understand, what we're trying now is:

LMB - Interact/Attack/LMB assigned skill RMB - Move OR RMB assigned skill depending on context

Is this correct?

dorkster commented 5 years ago

@ate088 Correct. LMB stays the same as it is when using WASD controls. RMB is the only thing that will potentially change.

ate088 commented 5 years ago

So it is the same as 1.08.21, minus the need to press shift to use the RMB assigned skill? It sounds like it could work, I'm trying to visualize it right now...

dorkster commented 5 years ago

Minus the need to press shift to use the RMB assigned skill. The LMB skill can be used without needing shift.

ate088 commented 5 years ago

What is the behavior if I assign let's say 'Blood Strike' to RMB, and click-and-hold on an enemy? After executing Blood Strike once, what happens next? a) keep executing Blood Strike until I release RMB b) switch over to normal attack, or c) switch over to move, not execute again until I click RMB again

In the case of a), if I assign normal attack to RMB wouldn't that pretty much be the Diablo control scheme but with RMB and LMB reversed?

EDIT: After thinking a bit more, no, if I assign normal attack to RMB, it results in the same 'sticky controls' issue. The upside that is clear to me is that we no longer have a button gated behind the shift key, though.

dorkster commented 5 years ago

It would be A, but it'd switch to movement if the enemy died as well. Once moving, the player will be able to keep RMB pressed to execute Blood Strike on another enemy and repeat until RMB is released.

ate088 commented 5 years ago

Okay...so if I click-and-hold RMB on a single enemy, in this scenario: 1) it will execute Blood Strike until the enemy died 2) after that, if I keep holding RMB down, it will move my character to mouse point and 3) the moment my mouse hovers over a new enemy it will use Blood Strike on that enemy OR 4) if the enemy is out of range of Blood Strike it will move into range, and then use Blood Strike?

If this is the case what is the drawback if I were to let's say swap LMB and RMB around in keybindings? Combat-wise it seems like doing this will already make things identical to Diablo (the only thing being that all non-combat functions like talking to npcs and shops would use the RMB instead of the LMB but let's put that aside for now)

dorkster commented 5 years ago

You could swap the bindings afaik, but that would make navigating menus confusing. Maybe a option to specifically swap mouse move between Main1 and Main2 would be better. Then maybe we can make the defaults like 1.08 again while providing the other configurations as options.

ate088 commented 5 years ago

Right, if we can swap the mouse move over then my ideal set up would be:

LMB: Interact/ Mouse Move OR LMB assigned skill( behaving the way you currently suggest the RMB behaves) RMB: RMB assigned skill

and my suggested default keybindings when you first start the game would then be:

LMB: Blank slot RMB: Swing/Shoot/Channel

dorkster commented 5 years ago

So as of https://github.com/flareteam/flare-engine/commit/b27ad0119109846a80c358f5d085c8ce720d81b5, Flare now has two new settings to control mouse movement behavior:

The default engine setting for these is swap=off, attack=on. This gives Diablo-like controls on the left mouse button. For the behavior that was introduced in Flare 1.08.21, it would be swap=on, attack=off. I've been enjoying my time playing with both settings turned on. So hopefully, everyone that wants to use mouse controls will be able to find a configuration they like.

@ate088 I have no plans to change the actionbar based on controls scheme. The default actionbar should be suitable for all control schemes, and it's easy enough for players to change if it's not.

ate088 commented 5 years ago

Nice! I won't be able to try it until at least the end of the month though, I'll be pulling some serious overtime at work till then. Thank you so much for addressing our concerns, looking forward to the next build!