Help us improve the clients' mouse interaction

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Help us improve the clients' mouse interaction

Post by louis94 »

Hello,

This topic is about improving the various clients' user-friendliness, with a particular focus on mouse interaction. We would like to ask you what should happen when you click on the map. While many of you probably know it well already, we think the current behaviour lacks discoverability. New users may not see features hidden in the menus.
Please share below any remarks you have about how mouse input is handled. In particular, tell us if you remember having had difficulties finding how to do something. When doing so, please tell us the client you use (Web, Gtk, Qt, Sdl). We're particularly interested in input from users having discovered Freeciv recently.
If you want to do more, you can design a complete interaction pattern (what happens when you click on the map). See below for more information.

This brainstorm thread will run until there is a full week without any new post, with a maximum of two months. After that, we will open another topic to elect the best pattern.

If you're a member of another Freeciv-related community, please post a link to this topic there. The more users see this, the better.

Thanks in advance to anyone sharing remarks or ideas.
AndreasR,
sveinung,
louis94

Designing your pattern

Any pattern should have the following 'essential' capabilities:
  • Center the map
  • Select unit
  • Goto command (select the tile an unit must go to)
  • Open city dialog
A typical mouse has three buttons: left, right and middle. You may use all three, but take care not to hide essential features in the right and middle buttons (touch screens don't have them). In addition to the three mouse buttons, there are three 'modifier' keys: Shift, Ctrl and Alt. When pressed together with a mouse button, they may initiate a different action. As some Linux window managers use Alt+Mouse to move windows, please don't use that key. Also remember tablet computers don't have these keys.

You may use the following UI elements when designing:
  • Dialogs are small windows, focused on doing one thing. One may put many features in dialogs, but they may interrupt the user's workflow when used without care.
  • Panels are static rectangle, typically in the corners of the screen. They can include many features, but as they hide part of the map, use them with care. Empty panels waste space; disappearing panels are context menus.
  • Context menus are menus like many applications feature on right-click. They have the advantage of being very easy to close, but can have less features than dialogs.
You don't need to describe what these elements look like; just tell what their purpose is (eg 'Unit selection dialog'). (Re)designing them is off-topic here.

Current status

In order to give you a starting point, we compiled a list of how the clients currently handle mouse interaction. All clients use the same basic pattern:
  • The right mouse button centers the map
  • The left mouse button selects units and is used for goto
  • The middle mouse button shows tile information
In addition to that, there are differences depending on the client.
Regarding cities:
  • (All) Right-clicking a city does nothing but centering the map
  • (Gtk) Left-clicking a city opens the city dialog
  • (Web) Left-clicking a city opens the city dialog if the city is empty or has no idle units. If the city has units without orders, then the context menu is shown
Regarding unit stacks (several units on the same tile):
  • (Gtk) Left-clicking a stack opens a dialog
  • (Qt) Left-clicking a stack opens a context menu allowing the selection of one unit
  • (Web) Left-clicking a stack selects the top unit and shows all units of the stack in a panel
Misc:
  • (Gtk) Click-and-drag moves units
  • (Gtk) Right click-and-drag draws a rectangle and selects all units inside it
  • (Web) Click-and-drag initiates a goto command, without actually moving the unit
  • (Web) Right-clicking selected units opens a context menu
  • (Web) Left-clicking any unit opens a context menu
  • (Web) Left-clicking a tile when an unit is selected initiates a goto command (like pressing G)
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Help us improve the clients' mouse interaction

Post by Lachu »

Sorry for not use described convention.

In my opinion after clicking on map, there should circural menu displayed with possibilities.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Help us improve the clients' mouse interaction

Post by louis94 »

Lachu wrote:Sorry for not use described convention.
No problem ! Any idea is welcome, in any form. Moreover, thank you for your feedback :)
Lachu wrote:In my opinion after clicking on map, there should circural menu displayed with possibilities.
Interesting idea, items in circular menus are more easily accessible than in regular ones.
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: Help us improve the clients' mouse interaction

Post by The Square Cow »

(I use Gtk2, with the trident tileset)
I think that right clicking should be bound to the information dialog that is currently bound to the middle mouse button. The middle mouse button would be bound to the centring function to match the convention of using the middle mouse button to handle view manipulation. Right clicking is also a common action for users to do so they are more likely to discover the wonderful information dialog that way.


Note that circular menus require icons and graphics which are more difficult to come by. On the other hand, they don't require translation for internalization.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Help us improve the clients' mouse interaction

Post by louis94 »

(My opinion, not anything "official")
The Square Cow wrote: I think that right clicking should be bound to the information dialog that is currently bound to the middle mouse button. The middle mouse button would be bound to the centring function to match the convention of using the middle mouse button to handle view manipulation. Right clicking is also a common action for users to do so they are more likely to discover the wonderful information dialog that way.
The information dialog is wonderful for mid- to advanced users, but gives too much information to beginners. And many laptops don't have a middle button at all ; moving the map is a must-have feature. (In my experience, two-finger horizontal scrolling doesn't work well.)
Making the information dialog more discoverable would indeed be an improvement.

[/quote]Note that circular menus require icons and graphics which are more difficult to come by. On the other hand, they don't require translation for internalization./quote]
I'm pretty sure we can find/make good icons : the SDL client is already heavily icon-based, we can take these as a basis. Both menus require translations, because one will want tooltips to explain the icons.
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: Help us improve the clients' mouse interaction

Post by The Square Cow »

(Also my opinion)

One could always use the minimap to move.


Also, left clicking on the minimap should move the view instead of just right click.


Maybe, space + click and drag should cause pan, like some other programs use.
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Re: Help us improve the clients' mouse interaction

Post by bard »

I have one request about "goto" movement with the mouse.
In gtk client, when there is a unit selected and you maintain the left button pressed, it starts the "goto" mode. Then, the tile where you place the mouse cursor is selected as destination when you release the mouse button, or when you click the right button.
While this "goto" is enabled, I miss a way to pan the map, and a way to cancel the movement. I think the most intuitive would be to pan the view when the cursor is close to the border (with left button pressed), and to cancel the movement when you press the right button (with left button pressed).

I guess each person has a different desired behavior, I wonder if it would be possible to make the controls fully customizable. You know, a preferences window where all possible mouse interactions are listed, and where you can select the action that you want to asign to each one.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Help us improve the clients' mouse interaction

Post by louis94 »

Hello bard,

The goto mode (from the G key) can be exited at any time by pressing ESC, or by hovering the selected unit and releasing the mouse. I think that right clicking having the same effect as left clicking can be considered a bug, so I filled one (https://gna.org/bugs/index.php?23341).

I think the second part of your message (configurable interaction) is a recurring request, so I'll try to explain why it's not that simple.
While technically feasible, configuring each aspect of the mouse interaction would in fact be both a usability and programming nightmare. Just for you to get a picture, here are the different ways to move an unit in the Gtk client (maybe I don't know all of them, I learned about the "goto mode" only a few seconds ago):
  • G key then click
  • Drag-and-drop
  • Arrow keys (keyboard)
  • The goto mode you described
One would have to allow such combinations (and more: two-finger scrolling, pinch, ...) for a lot of actions: move the map, move units, information tooltip, connect with [road, irrigation, railroad, maglev, farmland, mine], make trade route, patrol, ... There should be shortcuts to exit modes, several actions could be done at the same time (eg centering the map and moving units), ...
If one can come with a clean UI for the configuration, maybe somebody will try to implement it, but I doubt it is possible.
A more sophisticated (but maybe easier) way would be to create "profiles", each having different settings. This is far from trivial code-wise, but only one combo box in the UI would be needed.

Anyway, this thread is about the default interaction*, the one users will face when they first meet Freeciv. Not everyone will open a Settings dialog, so it should be as good as possible.

Louis

* The settings won't be implemented soon anyway...
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Help us improve the clients' mouse interaction

Post by louis94 »

The Square Cow:
The minimap is too small to be really helpful here, and it is too far from the map. I agree left-clicking the minimap to center the view would make sense.
Space+(click)+drag (or drag alone) is indeed used by programs such as Gimp or Krita. I don't think these are well-known shortcuts, though.
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Re: Help us improve the clients' mouse interaction

Post by bard »

I have recently programmed an android app (the one in my signature) and I faced the same task of designing the ui controls, that were in some way similar to those needed to play freeciv. I admit I also decided not to allow customization due to the complications you describe.
After playing freeciv with gtk, sdl, web, and android clients, I have also been thinking about my wishes for alternative controls, so I appreciate that you opened this thread.

I'd differentiate these 5 possible uses of a button, that can be implemented with mouse buttons, and also with touch screens:
- tap (short click): press, quick release.
- scroll (short click and move): press, quick move.
- hold (long click): press, keep in same tile some time, then release in same tile.
- drag (long click and move): press, keep in same tile some time, then move.
- double (double click): press, quick release, quick press, quick release (it also triggers the tap event with first click).

This is my suggestion for default controls, although it is hard to know for sure without testing it, so I could change my mind in the future:

Left Button
- tap (on own city): open city dialog
- tap (on own unit): open unit dialog
- hold or drag (on tile with own units not selected): select first unit in the stack or city, and start goto.
While button pressed, scroll view when close to the border of the window; cancel when other button clicked before release; cancel if released in the same tile; and move the unit if released in other tile.
- hold or drag (on tile without own units, or tile with units already selected): start goto for selected units.
- scroll: scroll view
- double click: center view

I think it would allow to control the game mainly with one single button of the mouse, or one single finger in a touch screen. The right button (or two finger gestures) could be used to show the tile info, start an area selection, or open extra dialogs. For example:

Right Button
- tap: dialog with all possible actions (like web client)
- hold: shows tile info
- scroll or drag: draws a rectangle and selects all units inside
Post Reply