dMZX Forums: Add generic context-sensitive joypad actions -> Archived Requests -> Tracker

Jump to content

Report ID 734 Title Add generic context-sensitive joypad actions
Product Archived Requests Status Implemented (Severity 2 - Fair)
Version 2.92 Fixed in 2.92

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #734: Add generic context-sensitive joypad actions

#1 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 03 December 2018 - 05:18 AM

Split from here.

The ability to map joypad buttons to generic actions that behave differently according to the current MegaZeux context (e.g. gameplay, dialog, menu) should be added. Additionally, these generic actions should be mappable to KEY_PRESSED values on a game-specific basis.

Example configuration and generic actions:
Posted Image

/*
#  Action         Title screen    Window          Game key (default)
# -------------  --------------  --------------  ----------------------
#  up                             Cursor up       Up (move)
#  down                           Cursor down     Down (move)
#  left                           Cursor left     Left (move)
#  right                          Cursor right    Right (move)
#  a              Play game       Select          Space (shoot)
#  b              Main menu       Cancel          Delete (lay bomb)
#  x              Load world      Select char     S (Caverns: spells)
#  y              Reload save     Backspace       P (Caverns: altar)
#  select         Exit            Cancel          Escape (exit[1])
#  start          Play game       Select          Enter (game menu)
#  lshoulder      Settings        Next element    Insert (switch bombs)
#  rshoulder[2]   Settings        Settings[3]     F2 (settings)
#  ltrigger[2]    Load world      Page up         F3 (save game)
#  rtrigger[2]    Reload save     Page down       F4 (load save)
#  lstick[2]                      Home
#  rstick[2]                      End

# Actions "up"/"down"/"left"/"right" are intended for a digital pad. Actions
# "l_up"/"l_down"/"l_left"/"l_right" and "r_up"/"r_down"/"r_left"/"r_right"
# also exist, which are similar and intended for analog stick mapping on
# controllers that possess both a digital pad and analog sticks.

# [1] This behavior will always override other bindings unless the
# exit dialog has been disabled.

# [2] The rshoulder action is highly likely to be unmapped on console ports
# that use an onscreen keyboard by default. Availability of several other
# actions also varies.

# [3] Works on the main menu and game menu. May not work on other windows
# currently.
*/


The Nintendo DS pad.config file might have:
joy1button1 = act_a
joy1button2 = act_b
joy1button3 = act_x
joy1button4 = act_y
joy1button5 = act_lshoulder
joy1button7 = act_select
joy1button8 = act_start


Demon Earth's game.cnf file might look like:
# A (sword)
joy[1,16].a = key_a

# S (spirit shot)
joy[1,16].b = key_s

# Space (hold direction)
joy[1,16].lshoulder = key_space



Benefits:
  • Generic actions would mean different console pad.config files could be defined more readably.
  • Context-sensitivity would drastically improve console button mapping by allowing e.g. Start to both start the game from the title (like P) and open the menu in-game (like Enter).
  • Having a standard for assigning these generic actions will help unify console pad.config setups (which currently vary drastically in some cases).
  • The JOY_SELECT generic action can not be disabled or overriden by game configs, meaning there will always be a standard (and remappable) way to exit games on consoles.
  • Having specific buttons/axes/hats mapped to generic actions and allowing users to map the abstracted actions to KEY_PRESSED values creates a simple and universal standard for defining game-specific joypad configurations.
    • Separating specific button/axis/hat values from game-specific configuration would allows users to map their personal joypads based on their own needs without necessarily changing game-specific mappings.
    • Likewise, game mappings could be redefined by games without affecting the behavior of the MegaZeux UI for a particular user.


Requirements (crossed-off items are finished in the branch joy-action):
  • Store actual joypad axis/button/hat information instead of faking key presses by default.
  • Add support for the enum values to the config file.
  • Add context-sensitive handlers to each context and non-context UIs.
  • Documentation in config.txt (and possibly add a guide in the docs folder for creating new pad.config files).
  • Move consoles to new platform-independent joystick functions.
  • Replace existing console pad.config mappings with generic mappings.


edit: updated to reflect changes introduced in this pull request.

This post has been edited by Lachesis: 08 July 2019 - 05:18 PM

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 3)

#2 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 10 February 2019 - 10:47 PM

Updating status to: Approved
Updating severity to: 2 - Fair

Updated to reflect the actual enum/aliases used.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 20 March 2019 - 09:50 AM

Updating status to: Implemented

Implemented in GIT b2ef1987. See config.txt for more info.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#4 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 23 July 2019 - 12:30 AM

Moving to: Archived Requests


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

1 User(s) are reading this issue
1 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2024  IPS, Inc.