This is a comprehensive list of every interaction a player will make.

This game will support keyboard/mouse and controller as input methods.

Mouse only!

It’s important to note that the entire game should be playable with just the mouse. The keyboard simply allows for hotkeys or shortcuts for certain actions. This will allow us to support touch screens on PC tablets (or mobile if we ever do that).

Input action reference

This is a reference for terminology used to refer to input actions, applicable to both keyboard/mouse and controllers. Xbox labels are used here.

Input ActionPurposeDefault controller buttonDefault keyboard button
Directional InputNavigate menu selections, move a virtual pointer, etc.Left stick AND dpadWASD AND arrow keys
ConfirmSelect menu elements, confirm choices, etc.AEnter*
BackGo back in menus, cancel choices, etc.BBackspace*
Cycle LeftCycle backwards through tabs in a menu, units on the grid, etc.LBQ
Cycle RightCycle forwards through tabs in a menu, units on the grid, etc.RBE
View DetailsServes two functions:
- Is held to reveal a more detailed description for items and abilities.
- Allows controller users to view details about items in the middle of battles.
YLeft Shift
End TurnEnd the current turn.XSpace
Camera PanPan the camera during battles.Right stickWASD
Zoom InZoom the camera in.LTScroll Up
Zoom OutZoom the camera out.RTScroll Down
View StatusOpens the status menu.SelectTab
PauseOpens the pause menu.StartEsc
* Note: In addition to these keys, Left Click should be a confirm input, and Right Click should be a back input. These cannot be unbound.

”Pointer” vs “Cursor”

Pointer and cursor refer to two different concepts. It’s important to know the difference when reading this GDD.

  • A pointer is an element that you move freely to point at things and select them. For keyboard/mouse this is the mouse pointer, and for controller this is the virtual pointer moved using directional input.
  • A cursor is an indication of which element is currently highlighted, used when navigating menus with a controller. Constrained to menu elements, and doesn’t have the freedom of movement that a pointer has.

How to handle mouse clicks

Mouse click events should be handled when the mouse button is sequentially pressed and released on the same element. This should give the player the opportunity to move their mouse off an element and release the button if they accidentally pressed on the wrong thing.

For the programming team:

It’s important for the input system to reliably differentiate between a click and a drag. We don’t want clicks to fail because the player accidentally moved the mouse a few pixels, registering a drag instead.

I suggest only entering the “dragging” state if the player has clicked and dragged the mouse a certain distance away from its starting point. If they release the mouse button before that happens, a click is registered instead.

Player Interactions

InteractionKeyboard/MouseController
Navigating menusThe mouse is used to click on menu elements.Menu elements should be highlighted and navigable using the controller’s directional and confirm inputs.
Navigating backwards in menusThere should always be a “back” or “cancel” button the player can click on.The “back” input is used to go back in menus.
Navigating tabsThe mouse is used to click on tabs.Tabs are cycled through using the Cycle Left and Cycle Right inputs.
Viewing details about items and status effectsThe mouse is used to over the related element.A cursor is used to highlight the related element. The “view details” button is used to do this during battles.
Purchasing items from the shopThe player clicks and drags a shop item to the character they want to give it to.The player uses a cursor to select a shop item, then uses another cursor to select a character to give it to.
Selecting grid cellsThe mouse is used to click on cells on the grid.A virtual pointer is used to select cells on the grid. The pointer should be constrained to the edges of the grid, and should automatically snap to the centre of the nearest cell when directional input stops.
Panning the cameraThe WASD keys pan the camera, or the mouse is used to click and drag on the grid, moving the map around with it.The right stick is used to pan the camera.
Zooming the cameraThe scroll wheel is used to zoom the camera.The Zoom Out and Zoom In input actions are used to zoom the camera.
Selecting rooms on the district mapThe mouse is used to click on an available room on the map.Directional input is used to navigate a cursor onto the desired room. The next possible room choices should always be laid out vertically anyway, so only vertical input is necessary.