Author Topic: Keeping gamepads (and other odd peripherals) in mind  (Read 22728 times)

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Keeping gamepads (and other odd peripherals) in mind
« on: September 05, 2013, 10:01:31 AM »
I know some people play with a gamepad. I believe Legend is the only one who does RLs on a gamepad, but I think we should all be zealous about catering to Legend's needs :) So for the game I'm currently starting to write, I've been thinking I want an interface that plays well with this particular device.

But what should I keep in mind? I don't really know much about the anatomy of gamepads in general. How does a typical gamepad handle diagonals, for instance? How many buttons do I have to play with? Some buttons are typically "metabuttons", like Select and Start, right?

I want to keep the UI clean and simple, with just a few buttons needed to play the game, and the default option to access inventory etc. with the cursor keys. The keys will all be remappable, and I'll add options for keyboard shortcuts (eg. immediately access item X, without first navigating through the inventory), but they'll be optional to streamline the experience for keyboard users, whilst retaining a functional UI for those who'd rather wield a mouse or a gamepad.

Related question: Am I right in believing that mouses/touchpads used on Macs only have one button? If so, the game must be playable with just the left mouse button, or am I missing something?

As always,
Minotauros

Edit: Maybe I'm just being lazy asking this. If that's the case, sorry, feel free to ignore me. There is already this thread, I see, where I learn that the gamepad has 12 buttons in total, and that there is an application called xpadder to map the keys manually. That leaves me wiser, but still not quite enlightened, I think. How much of a hassle is this xpadder thing, for instance. I'd love a game where you can just plug in your gamepad, and go: "A to fire, B to reload, Select for extended actions, and Start for main menu, yeah, okay, let's make bonnets bloody!" I can also surely seek out some documentation on the web. But maybe this post can spawn some interesting discussion anyway.
« Last Edit: September 05, 2013, 10:09:53 AM by AgingMinotaur »
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

JohnK

  • Newcomer
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #1 on: September 05, 2013, 04:14:37 PM »
Your typical modern controller has...

2 analogue sticks (left and right).
A d-pad (the cross shaped thing which makes up 4 buttons).
Start and select/back buttons in the middle.
4 normal buttons on the right.
2 shoulder buttons.
2 shoulder triggers (you can get an analogue for how far they are depressed).

I've never tried a rogue-like on a controller but from having played/written other games on one I would imagine you'd go with...

Left analogue stick for movement (4 way or 8 way, just make sure you set up a decent dead zone so movement doesn't get misinterpreted).
Right analogue can scroll round the map and/or inspect.
d-pad for bringing up in game menus and start for the main menu. I think using this for movement would actually be a mistake.
Common actions go on the 4 buttons on the right. Use the shoulder buttons as modifiers for these (like shift and control) which gives you 12 possible actions.
I can't imagine sensible uses for the other buttons.

I'd imagine the only way to tell for sure is to buy one and try it out yourself, but I can't see why it shouldn't work.

X-Padder is pretty easy to set up and has plenty of options to configure it. You could even make your own config file and distribute it with your game if you didn't want to support it in your own code.


P.S. Macs can be set to allow a right click, but I believe it's off by default.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #2 on: September 05, 2013, 04:19:59 PM »
Thank you :)

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

IBOL

  • Rogueliker
  • ***
  • Posts: 102
  • Karma: +0/-0
    • View Profile
    • IBOLOGY LLC
    • Email
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #3 on: September 05, 2013, 06:22:57 PM »
hey, this is a great idea. maybe i'll go out and buy a cheap game-pad.
anything that adds something for players, especially that they don't get with other games.
(I once plugged my xbox controller into my computer, but it came out half way, shocked me,
and now doesn't work most of the time.)
Randomly Approaching The Infinite Realms.
http://ibology.org/

guest509

  • Guest
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #4 on: September 06, 2013, 12:37:02 AM »
XBox controller is the standard.

For Roguelikes I haven't thought much about the analog sticks. There's a DPAD, 4 Face buttons and 4 Bumpers on top (2 of which are trigger-like).

Diagonals are tough, but if you can do them with the cursor keys you can do them with the DPAD. You can wait to move the character until the directions are released, then read if it was a diagonal or just an orthogonal.

My control scheme I've been putting thought into uses the old NES controller.
-DPAD to move and bump, of course.
-A button to shoot, then pick a direction to shoot in. (Or I could put together a DOOMRL type targeting system)
-Select button takes you to the menu where you can move the cursor around with the DPAD and press A to wear/wield/use in inventory or take off an item in a slot. Press 'B' to drop an item. Press select again to back out.
-Press 'B' when not in the menu to pick something up. This also waits/searches if the square is empty, which could be a problem if you are trying to 'wait' on a scroll of scare monster but 99.9% of the time it's not an issue.
-Press start to quit/save.

So there you go. Shoot, Bump, Move, Pickup, Menu (use/wield/wear/take off and drop). I even have an idea for a 'belt' section of the inventory that you can use quickly without using a game turn, a 'free move' if you will. For potions and throwing stars and such.

Hope that helps. You don't need a ton of buttons. Final Fantasy, Zelda and Dragon Warrior only had the 2 buttons plus select. Press start to pause.

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #5 on: September 06, 2013, 05:49:35 AM »
You could also assign diagonal movement to the four shoulder buttons.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #6 on: September 06, 2013, 07:02:01 AM »
Re: diagonals, I guess a possibility is to leave the details configurable. Those who feel comfortable just using the standard stick/controller can stick to that. For those who want to be on the safe side, one of the buttons on the side could be used as a modifier key that shifts all directions 45°.

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #7 on: September 06, 2013, 12:08:01 PM »
Or you could just build a game around four-directional movement.

Holsety

  • Rogueliker
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #8 on: September 06, 2013, 12:21:37 PM »
Or you could just build a game around four-directional movement.

Boo! Hiss!

You could always have a modifier key. Ie. If you keep one of your shoulder buttons pressed (/held down) it "rotates" your d-pad inputs.
So that up is instead processed as up-left, and left is processed as left-down. (Maybe even show an icon on-screen that screams HEY YOUR INPUTS WILL BE ROTATED)
With a menu option whether you prefer your shoulder button to rotate your d-pad inputs to the left (like i just gave the example) or to the right. Since controllers have 2-4 shoulder buttons usually you could reserve the other shoulder button for running, just like how shift+direction key has you auto-traverse a corridor in most Angband variants.

There's a lot you can do with controllers. (Ofc. there's the hassle of having to plug your controller in just to play a particular game, so having things be optional is always nice :B)

edit: AND HE ALREADY KNEW. So much for being useful :b
Quote from: AgingMinotaur
… and it won't stop until we get to the first, unknown ignorance. And after that – well, who knows?

akeley

  • Rogueliker
  • ***
  • Posts: 348
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #9 on: September 06, 2013, 12:30:29 PM »
Gamepads are more comfortable than KBM.

Okay, this will sound either like beyond-obvious to some or total heresy to others (side I used to be on)...but it`s something I been deliberating on a lot  recently. So, was quite happy to see this thread appearing.  Of course some gaming genres will always be better off on a KBM, and while roguelikes might initially look like one of these, my recent experiences convinced me otherwise.

You see, I`ve been playing RLs on my handhelds a lot - NDS & PSP. There`s not much choice, but you can find a few ports, and they all utilize the DPAD/buttons/shoulders  - to a better or worse effect.  Of these:

Powder (NDS) - uses the "standard" system similar to the one Jo describes above. Movement on DPAD,  buttons/shoulders easily configurable and START takes you to a command list. Works great - but this game was coded as a handheld (GBA) native, so it`s bit different from the PC-centric majority.

TOME/Angband (PSP) - these are PC ports and the conversion wasn`t complete - or maybe not conversion itself but the UI implementation. Main method for commands: pressing (and holding) Triangle brings up a  a tiny letter set which you then navigate with DPAD. Quite a chore, especially trying to get to capitals/symbols - you have to hold shoulder  button simultaneously.  Everytime you need "*" for example, so common in lists - it`s really tiresome.  Theres also another shortcut, holding a button + DPAD navigates some pre-set commands, not too bad though a bit messy and you need to dig into config to set these up.

Nethack (PSP/NDS) - this is similar to Powder with rather "normal" DPAD movement, configurable buttons and main command list called with a button. Again, plays great. (Though diagonals dont work from DPAD fro some reason - you need to use touchscreen. Strange, but probably just coding omission)

So, the Powder/Nethack method already proves it`s very much doable  - and most importantly, playable. I`d already pick it over KBM (in some circumstances at least, like my current uncomfortable desk). But that`s not all - saved the best for the last...

Crawl (NDS) - a revelation, no less. This is a port of Linley`s DC 4.0 beta - and it absolutely rocks. Putting aside the awesomeness of the game itself, the control scheme here is a strike of genius. At first it totally bamboozled me and I put it aside as a curio, fired it up one day after Powder overdose, got into it and never looked back.

First, major change: pressing a DPAD direction won`t move you anywhere. You have to press A (while holding the direction) for that to happen. Sounds insane? Thought as much too. And yet...give it a whirl and it soon  becomes a second nature. One thing, diagonal "problem" disappears. The other: it`s a lifesaver for a hotheaded players like me who kind of rush everywhere by just holding a direction, which is quite often suicidal. So, a safety lock of sorts.

Second: all the major commands are mapped to the DPAD too. Sounds even crazier? Yep... but it works incredibly well. This system lets you map 9*4 (buttons ABCD) keypresses. Minus the 8 needed for movement and you have 28 bindable combinations - should be sufficient even for RLs with big command sets. There`s a visual hint when you hold a direction - it highlights ABCD options on-screen, so you don`t have to memorize them.

The main advantage of this system is perfect streamlining. Mostly I just use DPAD+ABCD, occasionally two others for map and "big" inventory. No need to dive into menus or fiddle with multiple buttons. Heartily recommended, would be more than happy seeing this implemented for old and upcoming roguelikes. I know it sounds convoluted on paper, but is a breeze to learn and use, really - and worth seeing in action, if you don`t have an NDS I suppose it could be emulated too.

And yeah, the diagonal-modifier method has been used in jRLs like Mystery Dungeon or Izuna and it works great.
« Last Edit: September 06, 2013, 12:36:09 PM by akeley »

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #10 on: September 06, 2013, 03:26:33 PM »
Boo! Hiss!

What's wrong with four directions?

guest509

  • Guest
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #11 on: September 06, 2013, 06:47:17 PM »
Watch gamehunter play an 8 direction game. Total pro. It adds lots of tactical variety.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #12 on: September 06, 2013, 10:18:11 PM »
What's wrong with four directions?

Well, for me personally, my world is currently ruled by hexes! hexes!! beautiful hexes!!! Or as you yourself so eloquently put it:
Make everything a hex.

On a gamepad, six-directional movement seems like it shouldn't be a huge problem. Since pushing the stick up or down doesn't do anything, it should be pretty quick to get the hang of it. That aside, I totally agree – I've never really understood this grudge some people hold against games designed with orthogonal tactics. For instance, would Go suck less if was eight-directional? Methinks not!

As always,
Mintauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #13 on: September 06, 2013, 10:31:26 PM »
Holsety: Great minds think alike, honey 8)

akeley: That's very interesting. Will have to reread your description of Crawl's UI to let it sink in, but it certainly seems like you can have your cake and eat it, too. Direction+A to move is quite intriguing, actually worth considering for a keyboard UI, even. It sounds like something you can learn to love quite easily, but that many old-timers and purists will hate at first sight. I guess leaving it configurable is almost not an option, since most people would just leave it turned off, rather than picking up annoying, good habits.

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Keeping gamepads (and other odd peripherals) in mind
« Reply #14 on: September 07, 2013, 01:21:36 AM »
First, major change: pressing a DPAD direction won`t move you anywhere. You have to press A (while holding the direction) for that to happen. Sounds insane? Thought as much too. And yet...give it a whirl and it soon  becomes a second nature. One thing, diagonal "problem" disappears. The other: it`s a lifesaver for a hotheaded players like me who kind of rush everywhere by just holding a direction, which is quite often suicidal. So, a safety lock of sorts.

Oh man, I just came up with this same idea myself and came running to the thread thinking I was some kind of genius.

It's really the perfect solution.  It's comfortable, it's convenient, you can move as fast as you can button, and you don't have to worry about your d-pad being unreliable.