Hotkeys for Movements / Mouse Interaction

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Hotkeys for Movements / Mouse Interaction

Post by Celtic_Minstrel »

The "moving island" is an interesting idea, but I wonder if it's really needed. If I understand correctly, you're assuming that you have arrow keys moving the mouse cursor, right? But there's really no need to involve the mouse cursor in hex selection in my opinion. All you need is a set of hotkeys which adjust the currently-selected hex. So for example, your QWESAXD (which sounds like a non-US keyboard since otherwise AXD are not adjacent; I'd instead suggest QWESZXC or the numeric keypad) could be used to move the selected hex around - Q is northwest, W is north, E is northeast, A is southwest, X is south, and D is southeast, and then S does some action with the selected hex, for example "select this unit" or "move the selected unit here" or "view moves of this enemy unit"; it would probably be context-sensitive.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Moving the selection one hex at a time would get tiring pretty fast. Look at how vi does it: it does have hjkl for moving one square up/left/right/down, but veteran users don't actually use those keys much. They use word-, sentence-, and paragraph-granularity movements. In a pinch they use repeat counts, 5j moves 5 lines down. Maybe we can come up with something along those lines.

For example, we could have sf for "select friendly unit". When the player types sf hints would pop up as in Fractal's screenshot, allowing the player to quickly select one of the hinted units. There would also be se for "select enemy unit". (We could also have ss4 for "select a unit of side 4" and so on, if we wanted to.) The existing / command would still work, too.

With a unit selected, we could type d for the unit statistics screen. If it's a friendly unit, we could also type a to attack or m to move. If we type m, we then type the distance to the destination hex. That causes the hexes at that radius to be hinted, and we select one of them with the hint. For example, m4a means "move to a hex at radius 4, the one hinted a" (up to radius 4 we can use one-letter hints, for radius 5 or more we need 2-letter hints). We could also have mw for moving to the adjacent hex to the north, and even mva for moving to the village hinted a (after we type mv wesnoth hints nearby village hexes for us to choose from).

To address the learning curve we could display on-screen the possible next keys, for example, after typing s wesnoth could show

Code: Select all

e - enemy unit
f - friendly unit
on the screen.
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

Celtic_Minstrel wrote: May 10th, 2019, 11:33 am you're assuming that you have arrow keys moving the mouse cursor, right?
Not really, currently you can use arrow keys to move the map view. Moving island works as a pseudo mouse pointer or the middle of a sniper scope. Sniper scopes have a dot or a laser guided aim which what I was trying to imitate with moving island/platform.

Basically like how FPS games have guide aims that follow the mouse, moving island works the same but it’s for selecting tile functions that normally involve mouse selection.

The "guide" which is a moving island/platform would allow you to assign hotkeys in which you can interact without using a mouse. Adding a toggle hotkey would imitate right mouse click.
Celtic_Minstrel wrote: May 10th, 2019, 11:33 am So for example, your QWESAXD (which sounds like a non-US keyboard since otherwise AXD are not adjacent;

The QWESAXD I mentioned is a hypothesis, if the game uses 8 tiles, QWEASDZX would’ve been my suggestion to the hotkey feature. Keyboards are nearly hex base but it’s not aligned for 7 tile adjustments that would probably hurt interaction due to confusing hotkey positions on how hotkeys would work in the current scheme. Matching it to current keyboard implementations would probably be confusing for most(???) on how keyboard to tile hotkeys would work.
Celtic_Minstrel wrote: May 10th, 2019, 11:33 am I'd instead suggest QWESZXC or the numeric keypad) could be used to move the selected hex around - Q is northwest, W is north, E is northeast, A is southwest, X is south, and D is southeast, and then S does some action with the selected hex, for example "select this unit" or "move the selected unit here" or "view moves of this enemy unit"; it would probably be context-sensitive.
QWESAXD/QWESZXC intention isn’t for navigation. Diagonal keyboard scrolling is wonderful, and arrow keys can already do those with combination of arrow key used to emulate diagonal scrolling.

Unit selection is the main problem with keyboards, context menu right clicks already responds to keyboard commands, attack enemy also responds to keyboard. The problem is you need mouse to emulate right click and left click to select enemy units.

josteph wrote: May 10th, 2019, 1:02 pm Moving the selection one hex at a time would get tiring pretty fast.
I think next unit can make it easier, which is already a function.
If you mean unit movement, you need a way to select your unit and then you need to be able to "hold" it until you decide to move/attack.

The real problem is moving units individually, which is a already a problem with a lot of units to control and using a mouse.

Unit movement would be probably be solved(???) using next unit, scrolling speed, and a feature that allows you to select tiles before the use of arrow keys and guided pointer.

I probably need visual explanation if I want to make my point across, I’ll probably do it sometime.
josteph wrote: May 10th, 2019, 1:02 pm For example, we could have sf for "select friendly unit". When the player types sf hints would pop up as in Fractal's screenshot, allowing the player to quickly select one of the hinted units. There would also be se for "select enemy unit". (We could also have ss4 for "select a unit of side 4" and so on, if we wanted to.) The existing / command would still work, too.
The problem is, without limiting which tile can be selected using keyboard, it would render keyboard feature useless due to map size and unit selection for enemy units. Without a guide, this feature would be limited or can only be used for coders, developers, advanced or professional players.
josteph wrote: May 10th, 2019, 1:02 pm If it's a friendly unit, we could also type a to attack or m to move. If we type m, we then type the distance to the destination hex. That causes the hexes at that radius to be hinted, and we select one of them with the hint. For example, m4a means "move to a hex at radius 4, the one hinted a" (up to radius 4 we can use one-letter hints, for radius 5 or more we need 2-letter hints). We could also have mw for moving to the adjacent hex to the north, and even mva for moving to the village hinted a (after we type mv wesnoth hints nearby village hexes for us to choose from).
This could work on chess based symmetrically aligned tile positions.

Assuming that’s implemented, the first problem is that you’ll need guide hints labeled within the map tiles.
Second, you’ll probably need to type and know the coordinates.
Third one letter hints would probably fail if the size and distance isn’t accounted for unit move type and move speed.
Fourth you’ll probably need a lot of hotkeys or maybe not.
Fifth making it feature specific would probably reduce versatility on using movement.
Sixth you probably need to memorize a lot if you want it to be "command" based user interface.
josteph wrote: May 10th, 2019, 1:02 pm To address the learning curve we could display on-screen the possible next keys, for example, after typing s wesnoth could show

Code: Select all

e - enemy unit
f - friendly unit
on the screen.
I think the learning curve would be high :lol:, I don’t know really :P.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Mawmoocn wrote: May 10th, 2019, 1:55 pm Not really, currently you can use arrow keys to move the map view. Moving island works as a pseudo mouse pointer or the middle of a sniper scope. Sniper scopes have a dot or a laser guided aim which what I was trying to imitate with moving island/platform.

Basically like how FPS games have guide aims that follow the mouse, moving island works the same but it’s for selecting tile functions that normally involve mouse selection.

The "guide" which is a moving island/platform would allow you to assign hotkeys in which you can interact without using a mouse. Adding a toggle hotkey would imitate right mouse click.
I wouldn't recommend this. Just try enabling Mouse Keys and moving the mouse pointer with the keyboard to just over one of the icons on your desktop. It's not exactly a smooth UI. Some sort of WASD to "select the adjacent hex to <direction>" would be better.

Also, if the crosshairs are in the center of the screen you'd need to do something to be able to select hexes close to the map edge.
Mawmoocn wrote: May 10th, 2019, 1:55 pm The problem is, without limiting which tile can be selected using keyboard,
But I did "limit which tile can be selected".
Mawmoocn wrote: May 10th, 2019, 1:55 pm Without a guide, this feature would be limited
I did propose to have on-screen reminders of the next key, and of course I think this idea (if implemented) should have documentation.
Mawmoocn wrote: May 10th, 2019, 1:55 pm Assuming that’s implemented, the first problem is that you’ll need guide hints labeled within the map tiles.
Second, you’ll probably need to type and know the coordinates.
Third one letter hints would probably fail if the size and distance isn’t accounted for unit move type and move speed.
Fourth you’ll probably need a lot of hotkeys or maybe not.
Fifth making it feature specific would probably reduce versatility on using movement.
Sixth you probably need to memorize a lot if you want it to be "command" based user interface.
Players won't need to know the coordinates. Accounting for unit move costs is trivial, there's already code for that, it's the code that highlights some hexes but not others when you click a friendly unit with the mouse. I don't know what you mean by "feature specific".

And yes, this sort of user interface has a higher learning curve. However, it pays off by being more efficient. This idea is more efficient than your crosshair idea because this idea knows more about wesnoth maps than your crosshair idea.

Please re-read my suggestion, feel free to request clarifications, I do think you misunderstood it.
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

I revisited your other post and I think I probably need some clarification here.
josteph wrote: May 10th, 2019, 1:02 pm They use word-, sentence-, and paragraph-granularity movements. In a pinch they use repeat counts, 5j moves 5 lines down. Maybe we can come up with something along those lines.
Prototype on how it works in my brain

I type /, sf assuming leader is named sf1 type it, then type the corresponding hint to move or attack, assuming position of hints is generated, I type m1. If I want to attack using my unit to the enemy... type /, sf1, a2 or m2a or ma2.

Does it work this way?

josteph wrote: May 10th, 2019, 4:54 pm I wouldn't recommend this. Just try enabling Mouse Keys and moving the mouse pointer with the keyboard to just over one of the icons on your desktop.
Please note: I am not trying to control a mouse or a mouse pointer.


Diagonal movement inside the game has some faults like zig zag when moving diagonal, fast scroll speed makes it unnoticed if you used it.

I was aiming to control an area of influence in which a keyboard could interact. Similar to hints, limited in range of interactive influence. I personally don’t like typing things.

josteph wrote: May 10th, 2019, 4:54 pm Also, if the crosshairs are in the center of the screen you'd need to do something to be able to select hexes close to the map edge.
Mawmoocn wrote: May 10th, 2019, 2:04 am Platform’s center position can be changed by the use of a toggle (ctrl/shift/alt or any hotkey) and arrow keys. By default, using a toggle and arrow keys will only move moving platform’s position and not the whole map.

The reason for this is to aim dead zones, a center position couldn’t target, especially on small maps.
Probably should adjust to edge of screens by default is another idea. I was against it since... well personal tastes :P.




josteph wrote: May 10th, 2019, 4:54 pm But I did "limit which tile can be selected".
My bad, I assumed it didn’t, since you can place movement beyond the scope of your turn.

The problem with hints is, area of influence, I assumed that movement by radius wasn’t limited by unit type.

I also thought hint’s area of influence doesn’t adjust.
josteph wrote: May 10th, 2019, 4:54 pm Accounting for unit move costs is trivial, there's already code for that,
Well assuming this code doesn’t bypass that code, I won’t see any problems.
josteph wrote: May 10th, 2019, 4:54 pm it's the code that highlights some hexes but not others when you click a friendly unit with the mouse.
There’s my problem I think... hint based UI may fail to highlight possible hexes and show hints even if it wasn’t possible to move a unit on that spot.
josteph wrote: May 10th, 2019, 4:54 pm I don't know what you mean by "feature specific".
josteph wrote: May 10th, 2019, 1:02 pm mva



josteph wrote: May 10th, 2019, 4:54 pm Please re-read my suggestion, feel free to request clarifications, I do think you misunderstood it.
I guess I did...
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Mawmoocn wrote: May 10th, 2019, 6:19 pm I revisited your other post and I think I probably need some clarification here.
josteph wrote: May 10th, 2019, 1:02 pm They use word-, sentence-, and paragraph-granularity movements. In a pinch they use repeat counts, 5j moves 5 lines down. Maybe we can come up with something along those lines.
Prototype on how it works in my brain

I type /, sf assuming leader is named sf1 type it, then type the corresponding hint to move or attack, assuming position of hints is generated, I type m1. If I want to attack using my unit to the enemy... type /, sf1, a2 or m2a or ma2.

Does it work this way?
No. You don't type /. You just type sf directly, without / first. The name of the leader doesn't matter; every hex that hosts a friendly unit will be hinted.
Mawmoocn wrote: May 10th, 2019, 6:19 pm
josteph wrote: May 10th, 2019, 4:54 pm I wouldn't recommend this. Just try enabling Mouse Keys and moving the mouse pointer with the keyboard to just over one of the icons on your desktop.
Please note: I am not trying to control a mouse or a mouse pointer.
Sorry, I misunderstood :(
Mawmoocn wrote: May 10th, 2019, 6:19 pm I was aiming to control an area of influence in which a keyboard could interact. Similar to hints, limited in range of interactive influence.
Ah, I think I understand. The UI highlights 7 hexes, the player can use some form of extended WASD to move the 7 hexes around, and there are hotkeys for "selecting" any one of the 7 hexes?
Mawmoocn wrote: May 10th, 2019, 6:19 pm I personally don’t like typing things.
...?
Mawmoocn wrote: May 10th, 2019, 6:19 pm
josteph wrote: May 10th, 2019, 4:54 pm But I did "limit which tile can be selected".
My bad, I assumed it didn’t, since you can place movement beyond the scope of your turn.

The problem with hints is, area of influence, I assumed that movement by radius wasn’t limited by unit type.

I also thought hint’s area of influence doesn’t adjust.
Let me clarify.

I imagine that moving a unit would involve the following steps: 1) select the unit 2) select a hex for it to move to. That's just like how it works with the mouse today, including all the edge cases (fog, ambush, multi-turn move, enter_hex events...). Regarding radius, I propose that after m4 all the hexes at radius 4 that are reachable this turn will be highlighted and hinted. Other hexes at radius 4, that aren't occupied by any unit, can be hinted but not highlighted, to facilitate multi-turn moves. Hexes at radius <4 or >4 will be unhinted and unhighlighted. By "highlighted"/"unhighlighted" I mean the graying out of some hexes as in "Show Enemy Moves".

I hope this time I managed to explain what I have in mind... :D
Mawmoocn wrote: May 10th, 2019, 6:19 pm
josteph wrote: May 10th, 2019, 4:54 pm it's the code that highlights some hexes but not others when you click a friendly unit with the mouse.
There’s my problem I think... hint based UI may fail to highlight possible hexes and show hints even if it wasn’t possible to move a unit on that spot.
I really don't understand how this might happen. Today, when you click on a unit of yours, wesnoth highlights which hexes it can move to this turn. All we need to do is to run that code and hint the hexes it highlights. I don't see how we could miss possible hexes with this approach.
Mawmoocn wrote: May 10th, 2019, 6:19 pm
josteph wrote: May 10th, 2019, 4:54 pm I don't know what you mean by "feature specific".
josteph wrote: May 10th, 2019, 1:02 pm mva
I still don't understand what you mean. m4 would hint hexes at radius 4; mv would hint villages. We could have other m[i]x[/i] things that will hint other sets of hexes. You'd still be able to move a unit to any place you want, even multi-turn moves. It's just that the common cases will require few keypresses.
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

josteph wrote: May 10th, 2019, 7:32 pm Sorry, I misunderstood :(
It’s alright :) it happens.
josteph wrote: May 10th, 2019, 7:32 pm You just type sf directly, without / first. The name of the leader doesn't matter; every hex that hosts a friendly unit will be hinted.
Hmm would the game recognize sf without command?
josteph wrote: May 10th, 2019, 7:32 pm The UI highlights 7 hexes, the player can use some form of extended WASD to move the 7 hexes around, and there are hotkeys for "selecting" any one of the 7 hexes?
Yes., but by default it stays where the current focus is, if there’re no focused/selected units, it will stay at the center screen.

josteph wrote: May 10th, 2019, 7:32 pm
Mawmoocn wrote: May 10th, 2019, 6:19 pm I personally don’t like typing things.
...?
Personally, I don’t like typing commands to play a game, I think I’ll feel like a robot soon once I do play that way :lol: :eng: :D. Well... I suck typing quick enough to compete :lol:.
josteph wrote: May 10th, 2019, 7:32 pm Regarding radius, I propose that after m4 all the hexes at radius 4 that are reachable this turn will be highlighted and hinted.
I don’t get radius or radius 4, I guess you consider radius as the full movement a unit can make?


If it was, I see no problems. Well.... the only problem I see it’s when how would hints appear for large maps....

josteph wrote: May 10th, 2019, 7:32 pm Today, when you click on a unit of yours, wesnoth highlights which hexes it can move to this turn. All we need to do is to run that code and hint the hexes it highlights. I don't see how we could miss possible hexes with this approach.
New features often need calibration, sometimes they need to calibrate present features to detect new functionality.
josteph wrote: May 10th, 2019, 7:32 pm I still don't understand what you mean. m4 would hint hexes at radius 4; mv would hint villages. We could have other m[i]x[/i] things that will hint other sets of hexes. You'd still be able to move a unit to any place you want, even multi-turn moves. It's just that the common cases will require few keypresses.
I’m not sure how to say it in words.

Village hinting relies on present implementation that detects villages. Future implementation may change it’s definitions or terrain.

It also faces a problem, If there are 2 or more nearby villages, which village would be pick automatically?

Recruitment order, would be unnecessary most of the time, but not at all the time, since move speed among other things, affect unit deployment. Small maps and multiplayer probably needs you to take this into account, which is my basis for this question.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Mawmoocn wrote: May 10th, 2019, 11:06 pm Hmm would the game recognize sf without command?
The same way it recognizes / or n or d or : or F1 or any other key. When you press s the game will check what the next keypress is, it might be f for "friendly" or e for "enemy" or a for ally, and hint the according units for the player to select from.
Mawmoocn wrote: May 10th, 2019, 11:06 pm Personally, I don’t like typing commands to play a game, I think I’ll feel like a robot soon once I do play that way :lol: :eng: :D. Well... I suck typing quick enough to compete :lol:.
To each his own, but this is a thread about developing a keyboard interface to wesnoth, after all...
Mawmoocn wrote: May 10th, 2019, 11:06 pm I don’t get radius or radius 4, I guess you consider radius as the full movement a unit can make?
By "radius" I mean the distance ignoring move costs of different terrains. Look here: https://www.researchgate.net/figure/Gro ... _326075011 the hexes labeled "2" are at radius 1, those labeled "3" are at radius 2, those labeled "4" are at radius 3, and so on.
Mawmoocn wrote: May 10th, 2019, 11:06 pm New features often need calibration, sometimes they need to calibrate present features to detect new functionality.
Yes, it's a well known maxim that any code change can introduce bugs.
Mawmoocn wrote: May 10th, 2019, 11:06 pm Village hinting relies on present implementation that detects villages. Future implementation may change it’s definitions or terrain.
First of all, if we change the definition of villages (their terrain codes or gives_income attribute or whatever), we'd break a lot of UMC terrain filters. If we ever do that, changing whatever C++ function implements mv will be a small part of the whole deal... and even if it does happen, even if mv does stop working some day, players will still be able to move to villages using m4. TIMTOWTDI :D
Mawmoocn wrote: May 10th, 2019, 11:06 pm It also faces a problem, If there are 2 or more nearby villages, which village would be pick automatically?
Neither. When you select a unit and press mv, villages would be hinted, and you'd have to select one explicitly.
Mawmoocn wrote: May 10th, 2019, 11:06 pm Recruitment order, would be unnecessary most of the time, but not at all the time, since move speed among other things, affect unit deployment. Small maps and multiplayer probably needs you to take this into account, which is my basis for this question.
It'll be possible to select which hex a unit will be recruited to. I haven't tried to design that yet, but it definitely needs to be part of the feature set.

If you have further questions you are welcome to ask them on Discord/IRC too.
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

josteph wrote: May 11th, 2019, 9:09 am The same way it recognizes / or n or d or : or F1 or any other key. When you press s the game will check what the next keypress is, it might be f for "friendly" or e for "enemy" or a for ally, and hint the according units for the player to select from.
I see a potential problem there, if you create typos before, during, and after typing, you probably need to see if your keypress is detected or reset.
josteph wrote: May 11th, 2019, 9:09 am By "radius" I mean the distance ignoring move costs of different terrains.
The problem here is well... assuming it already emulates a highlight, I think it will hint unwalkable and impassable terrain.

Hm and well I see a lot of potential for development glitches that includes maps. I’m probably wrong here :lol:.
josteph wrote: May 11th, 2019, 9:09 am Look here: https://www.researchgate.net/figure/Gro ... _326075011 the hexes labeled "2" are at radius 1, those labeled "3" are at radius 2, those labeled "4" are at radius 3, and so on.
I see, so how would radius work for 2 and above? How would it calculate or generate numbers/letters on it’s location guided hint?

What is the limit of area of influence for this feature? I think it’ll slow down large maps if there’s no limit to hint generation.

What is the starting/center point of generating hints? Is it center of a map scenario, center of the current selected unit, or center focus of your screen/monitor within the game?

Depending on which of these is picked, they provide different problems but they all have one thing in common, zoom affects it all.
josteph wrote: May 11th, 2019, 9:09 am even if mv does stop working some day, players will still be able to move to villages using m4. TIMTOWTDI :D
That’s nice to hear!
josteph wrote: May 11th, 2019, 9:09 am If you have further questions you are welcome to ask them on Discord/IRC too.
I prefer using forums as I don’t need to show my :oops: .... mistakes :lol:.

Well that said... I just hide them :eng:.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Mawmoocn wrote: May 11th, 2019, 4:50 pm I see a potential problem there, if you create typos before, during, and after typing, you probably need to see if your keypress is detected or reset.
Yes, an invalid keypress should be reported as an error. I'm not sure what to do about typeahead. When touch typists make a typo, they generally do a few more keypresses before they start to backspace. In vi-like user interfaces those typeahead keys can get interpreted as commands. (For example, if you intend to do m4asf to move one unit and select another, and by accident don't press a, then s will be taken as the hint, and f will be be taken as a new command.) This can be a problem if the typeahead keys are interpreted as a non-undoable action, for example, a move toward fogged hexes or an attack.
Mawmoocn wrote: May 11th, 2019, 4:50 pm
josteph wrote: May 11th, 2019, 9:09 am Look here: https://www.researchgate.net/figure/Gro ... _326075011 the hexes labeled "2" are at radius 1, those labeled "3" are at radius 2, those labeled "4" are at radius 3, and so on.
I see, so how would radius work for 2 and above? How would it calculate or generate numbers/letters on it’s location guided hint?
There are 24 hexes at radius 4, so we could assign each of them a letter. Let's say that we assign the letters in order, a being 12 o'clock, b being the next one clockwise, etc. That takes care of radius=4. I'm not sure what the hints for radius=2 and radius=3 would be but they should probably derive from the hints for radius=4. For example, in radius=4 the hex to the far south would be hinted m so in radius=3 m shouldn't hint a hex in the north.

And we need to figure out a system for radius=5 and up too, since units with 5MP are so common.
Mawmoocn wrote: May 11th, 2019, 4:50 pm What is the starting/center point of generating hints? Is it center of a map scenario, center of the current selected unit, or center focus of your screen/monitor within the game?
When you move a unit, that unit is the reference point.

The parts I didn't reply to aren't problems, I think.
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

josteph wrote: May 11th, 2019, 5:19 pm I'm not sure what to do about typeahead.
A way to reset it?
josteph wrote: May 11th, 2019, 5:19 pm This can be a problem if the typeahead keys are interpreted as a non-undoable action, for example, a move toward fogged hexes or an attack.
Maybe an option to type functions/movement with a visible text box?
josteph wrote: May 11th, 2019, 5:19 pm Let's say that we assign the letters in order, a being 12 o'clock,
What is the focal starting point of direction for generating hints inside a 12 o'clock radius?
josteph wrote: May 11th, 2019, 5:19 pm b being the next one clockwise, etc.
I’m against it? I think it would introduce confusion or some sort of mess.

It would probably look pretty though. :hmm:
josteph wrote: May 11th, 2019, 5:19 pm I'm not sure what the hints for radius=2 and radius=3 would be but they should probably derive from the hints for radius=4.
Focal starting point of direction and having their own area of influence can make it simple. m2a, m3a, m4a, will apply to their respective area of radius.

josteph wrote: May 11th, 2019, 5:19 pm And we need to figure out a system for radius=5 and up too, since units with 5MP are so common.
I suggest that numbers to be used when generating hints.

Letters could do this as well in the form of m4aa, m4az, once it reaches more than 26 hexes. I prefer numbers but let’s say letters also has a greater appeal compared to numbers.

It’s down to preference :lol:. Numbers would make me feel like a robot :lol:.
josteph wrote: May 11th, 2019, 5:19 pm When you move a unit, that unit is the reference point.
Do you need to type sf(default is to have no hints?) to select a unit before you could type a command/movement?

If units don’t have a way to select them without the need to select them to generate hints, it would create a burden to do routine 2 type confirmation to execute any action.

It probably needs a way to bypass sf because it would be a hassle to wait for a confirmation on their generated hint to do any movement.

Basically a shortcut is required.

Edit: I assumed every radius would have alternating rotations, my bad.... please disregard :oops: :lol:.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Mawmoocn wrote: May 11th, 2019, 6:28 pm
josteph wrote: May 11th, 2019, 5:19 pm I'm not sure what to do about typeahead.
A way to reset it?
I don't know if our input library provides this feature.
Mawmoocn wrote: May 11th, 2019, 6:28 pm
josteph wrote: May 11th, 2019, 5:19 pm This can be a problem if the typeahead keys are interpreted as a non-undoable action, for example, a move toward fogged hexes or an attack.
Maybe an option to type functions/movement with a visible text box?
Requiring an explicit "Enter" keypress at the end would do, yes.
Mawmoocn wrote: May 11th, 2019, 6:28 pm
josteph wrote: May 11th, 2019, 5:19 pm b being the next one clockwise, etc.
I’m against it? I think it would introduce confusion or some sort of mess.

It would probably look pretty though. :hmm:
Feel free to propose alternatives.
Mawmoocn wrote: May 11th, 2019, 6:28 pm
josteph wrote: May 11th, 2019, 5:19 pm And we need to figure out a system for radius=5 and up too, since units with 5MP are so common.
I suggest that numbers to be used when generating hints.

Letters could do this as well in the form of m4aa, m4az, once it reaches more than 26 hexes. I prefer numbers but let’s say letters also has a greater appeal compared to numbers.

It’s down to preference :lol:. Numbers would make me feel like a robot :lol:.
Yeah, two-letter combinations are a natural idea. Or we could, after m5 is pressed, hint the hexes at radius=5 that are north of the center hex with, say, n, and the hexes at the same radius that are south of the reference hex with s. It's hard to say how fluent this will be without trying it.
Mawmoocn wrote: May 11th, 2019, 6:28 pm
josteph wrote: May 11th, 2019, 5:19 pm When you move a unit, that unit is the reference point.
Do you need to type sf(default is to have no hints?) to select a unit before you could type a command/movement?

If units don’t have a way to select them without the need to select them to generate hints, it would create a burden to do routine 2 type confirmation to execute any action.
Good point. Maybe we should have a one-letter prefix (just s, not sf). Or maybe we should have a "move units" mode, so once the player presses s he can "select unit, move unit" in a loop, without pressing s again in between, and has to press Escape or something to get back to the mode where m means "write a chat message".
Mawmoocn wrote: May 11th, 2019, 6:28 pm It probably needs a way to bypass sf because it would be a hassle to wait for a confirmation on their generated hint to do any movement.

Basically a shortcut is required.
What confirmation are you talking about? There needn't be any confirmation at all. Even today, when you type :debug, after pressing : you don't wait for the textbox to appear before you type the rest of the command. Unit selection and moving will work the same way. The hints should be predictable so the player can type, say, sfxm4a all in one go, to have their archer (which they know is labeled x) move four hexes north. Of course the player may wait for the hints to be displayed, but that won't be required.

As I said earlier, this proposal is basically vi for wesnoth. It's a fun thought experiment, but I don't know how popular this will be...
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

josteph wrote: May 13th, 2019, 10:53 am Feel free to propose alternatives.
Can’t think of any, I think it’s much easier to keep it that way.

josteph wrote: May 13th, 2019, 10:53 am Or we could, after m5 is pressed, hint the hexes at radius=5 that are north of the center hex with, say, n, and the hexes at the same radius that are south of the reference hex with s. It's hard to say how fluent this will be without trying it.
If we use letter scheme, we would face problem on how would you detect north as m5n could mean move to north or move to a tile named n.

If we make moving to north with mn5, it could do the same, but it could introduce confusion.

I think it’s a nice feature overall as you can define the range, and the general direction you can move.
josteph wrote: May 13th, 2019, 10:53 am What confirmation are you talking about? There needn't be any confirmation at all.
It’s about selecting units, you need their "hint generated letter" to select them. It depends on selecting and moving units with the help of hints and their default behavior before and after selecting and moving these units.

Basically, human vision confirmation to hint generation comparison is what I’m talking about.
josteph wrote: May 13th, 2019, 10:53 am As I said earlier, this proposal is basically vi for wesnoth. It's a fun thought experiment, but I don't know how popular this will be...
That depends on it’s UI implementation.

It’s fun to think about this idea.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by josteph »

Mawmoocn wrote: May 13th, 2019, 6:34 pm If we use letter scheme, we would face problem on how would you detect north as m5n could mean move to north or move to a tile named n.

If we make moving to north with mn5, it could do the same, but it could introduce confusion.

I think it’s a nice feature overall as you can define the range, and the general direction you can move.
Actually, I think specifying the exact radius might not be that user-friendly. In vi, for example, you can do 15j to move 15 lines down, but it's hard to estimate whether you want to go 14, 15, or 16 down. So, how about if, once you select a unit and type m, several hexes around you would be hinted? In the following screenshot, I scattered Blood and Dread Bats on the hexes that I think should be hinted:
2019-05-13-184851_1920x1080_scrot.png
So, if you select the Vampire Bat and press m, the hexes that I placed higher-level bats on would be hinted. (They would be hinted regardless of what other friendly or enemy units are around.) Once you type the one of the hints to select a hex, there would be a second round of hints: the hexes at radius 0, 1, and 2 from the location you selected would be hinted. This system would require a one-letter hint for choosing from among the 18 hexes of higher-level bats and another one-letter hint for choosing from the 19 hexes around that higher-level bat (12 at radius=2, 6 at radius=1, plus the location of the higher-level bat itself), so it can select any location within radius 8 or less with two keypresses.

At this point, you could even use some sort of hexagonal variant of WASD instead of hinting, but the WASD would operate first at the coarse granularity (selecting one of the bats) and then at the finer granularity... which is similar to what you suggested, isn't it?
Mawmoocn wrote: May 13th, 2019, 6:34 pm
josteph wrote: May 13th, 2019, 10:53 am What confirmation are you talking about? There needn't be any confirmation at all.
It’s about selecting units, you need their "hint generated letter" to select them. It depends on selecting and moving units with the help of hints and their default behavior before and after selecting and moving these units.

Basically, human vision confirmation to hint generation comparison is what I’m talking about.
The hints should be predictable so a player can type them in before they're shown. For example, in terms of the screenshot above, the hint a should always mean "the location 3 hexes to the north of the selected unit". If the selected unit is so close to the map edge that "3 hexes to the north" if off-map, then a would simply not be used as a hint.
Mawmoocn
Posts: 160
Joined: March 16th, 2019, 3:54 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by Mawmoocn »

josteph wrote: May 13th, 2019, 7:04 pm Actually, I think specifying the exact radius might not be that user-friendly.
But it’s necessary once you reach more than 6 radius as it allows you to control exact coordinates a unit go through.
josteph wrote: May 13th, 2019, 7:04 pm In vi, for example, you can do 15j to move 15 lines down, but it's hard to estimate whether you want to go 14, 15, or 16 down.
I assume it works since it isn’t hex based but linear visual UI to select code. For wesnoth, I assume it wouldn’t work without tweaking it to work hexagonal directions, which is another problem altogether.
josteph wrote: May 13th, 2019, 7:04 pm So, how about if, once you select a unit and type m, several hexes around you would be hinted?
I agreed to this but it faces problems on typing command without hints if not implemented well on selecting units.

josteph wrote: May 13th, 2019, 7:04 pm In the following screenshot, I scattered Blood and Dread Bats on the hexes that I think should be hinted:
I thought it selects all tiles when creating hints, which allows fine grain control over movement.

Fine grain control will only matter once positioning of units is necessary, and for movement control.
josteph wrote: May 13th, 2019, 7:04 pm so it can select any location within radius 8 or less with two keypresses.
You mean I could type sfzm8g or sfdm10b in one line, if I memorize how it works?

josteph wrote: May 13th, 2019, 7:04 pm At this point, you could even use some sort of hexagonal variant of WASD instead of hinting, but the WASD would operate first at the coarse granularity (selecting one of the bats) and then at the finer granularity... which is similar to what you suggested, isn't it?
It’s a bit different but it could work on selecting units but it doesn’t allow you to type everything in one line.

Next unit also faces this problem.

If we select units based on their unique "hint", it would solve the issue of waiting for confirmation before typing.

As a consequence, it would be worse to implement my suggestion as it wouldn’t be as fast when typing everything in one line.
josteph wrote: May 13th, 2019, 7:04 pm The hints should be predictable so a player can type them in before they're shown. For example, in terms of the screenshot above, the hint a should always mean "the location 3 hexes to the north of the selected unit". If the selected unit is so close to the map edge that "3 hexes to the north" if off-map, then a would simply not be used as a hint.
I thought m3n or mn3 would do this as 3 represents radius 3 and n represents north, as 3 represents area of influence, and n represents movement.

Typing mn would mean move using all movement to move north of the map.

Though the problem is selecting tiles to attack units in which, a specific tile hint "coordinate" would probably solve this issue.
Post Reply