Author Topic: Project(?): creating a standard for keyboard controls in roguelikes  (Read 58057 times)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #30 on: January 26, 2010, 06:56:29 PM »
I had the Control Key tilt the Arrow Keys by 45° counter clockwise. While holding Control, pressing the Up Key would move the character up/left.

This is something I also thought. I have an idea of using ctrl+arrow up/down to move southwest/northwest and alt+arrow up/down to move southeast/northeast.

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #31 on: January 26, 2010, 08:19:10 PM »
What about just processing the command after no keys are pressed? So pressing top would allow me to add the right key, after the buttons are released my character moves up-right ?

But in most roguelikes i've got additional difficulties... use of hard coded scan codes !!! My layout has a way different mapping, Numpad e.g. : (plain) 123456789 (shift)♦♥♠♣€6✔✘9 (capslock)↔↓⇌←¦→↕↑⃗
« Last Edit: January 26, 2010, 08:22:39 PM by purestrain »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #32 on: January 27, 2010, 09:40:31 AM »
But in most roguelikes i've got additional difficulties... use of hard coded scan codes

Yes, developers should be aware of that. I noticed that SDL's standard keyboard codes work only with US keyboard layout, but you can use unicode codes to get the correct match with problem keys.

nhdaniel

  • Newcomer
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #33 on: January 30, 2010, 01:00:41 PM »
An interesting discussion... For the most part, I agree with many points in this discussion. The key (pun intended) points as I understand it:

* Using a generic key to "verb" and object is generally not viable - This would select too many objects from a player's pack to be useful. The idea of having a key allocated to each action creates a better user interface with only a select number of objects that verb applies to.

* For the most part, redundancy in commands can enter a game, probably from a historical perspective. Nethack with the wear and PutOn commands are a good example. However the problem once again becomes the use of a command that is too generic.

* Directional input - While "laptops" have been mentioned as the "minimum" requirement, the primary limitation is in the diagonal movement. Keypads are useful as they are a discrete entity on the keyboard, and it is difficult to hit the wrong key when using specifically setup direction keys.

As a general rule of thumb, you want to allow a player to perform actions with the least input possible. I think one problem not really discussed is tying an action to a specific set of objects. For example, "Read" being tied to only scrolls and spells. What if you could also "Read" other objects such as potions (such as reading the label on the potion). Thus when a player presses "r" to read something, they are given the normal menu, but can opt to read any other object as well. This opens a whole new level of gameplay, whereby more complex objects can exist, with complicated user interaction.

This is why in Interhack I have isolated the user interface from the actions performed. Anyone can write the interface however they like, yet the core game engine will not change. When defining the user interface, you set it up such that a physical action performed by a player (such as pressing a key or clicking a mouse button), leads to a message being sent to the server containing the relevant information. The ACTION was "read" and the object ID was YYY. Combine this with objects that can choose what actions to respond to, and you end up with some unique gameplay.

As such, I can code a potion, that has a label, which when read will give some clue for something else in the game. Or add an action "Study" - and the more an object is studied, the more it may reveal. Thus an archaeologist may be more skilled at studying objects, and may discover more.

Of course taking this path adds all sorts of complications to the game engine. And lets not get started on first person and third person perspective of verbs and generation of messages... :)

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #34 on: September 15, 2010, 07:15:14 PM »
First off:  I support digits as movement keys.  I figure it's best to let 12346789 be reserved for 8-directional movement.  Lots of newer laptops have numpads, and even if they don't, you can add a numpad on your USB port. Finally, if that's a problem, you can still type digits on the top row of the regular keyboard.  I thought that would be annoying, but once I got used to it I don't have a problem using a game that way.

I also think the arrows should be supported for 4-directional movement.   

Generally speaking I don't want to use keyboard keys for movement; especially not eight of them.  I want those keys for commands. 

A generic 'use' key for all items is not compatible with items that have multiple uses, and since I want the complexity of items with multiple uses, I will not be supporting a generic 'use' key.  There are games for which it's appropriate.  Mine's not one of them.

I use a natural language in which the verb in an imperative sentence precedes the object, so verb-object seems to me like a natural way to give commands to the computer.  But speakers of other natural languages will probably have different opinions.

I think that a good interface saves the player from making boring keystrokes whenever possible.  For example repeating an attack you've already made once should not take more than one keystroke unless you've run out of that kind of ammo or charges or mana, you've had that weapon or wand or whatever taken away, the target has died or fled out of targeting range, or something else has happened that means you can't exactly repeat it anymore.


Ex

  • IRC Communications Delegate
  • Rogueliker
  • ***
  • Posts: 313
  • Karma: +0/-0
    • View Profile
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #35 on: September 16, 2010, 03:55:20 AM »
First off:  I support digits as movement keys.  I figure it's best to let 12346789 be reserved for 8-directional movement.  Lots of newer laptops have numpads, and even if they don't, you can add a numpad on your USB port. Finally, if that's a problem, you can still type digits on the top row of the regular keyboard.  I thought that would be annoying, but once I got used to it I don't have a problem using a game that way.
A lot of netbooks don't have numpads, and although it is easy to buy one, it's very convenient to have SOME way to move without a numpad. I've been thinking about using unused keys like p[] l;' and ,./ or some other combination, but I've never actually tried it.

Quote
I also think the arrows should be supported for 4-directional movement.   
I agree with this! But I hate hjkl controls! I've never been able to use directional keys that were laid out in a straight row. Even when I was a kid using the Apple 2gs I could never work it. IMO, pl;' or l,./ would be better keys than hjkl. Ideally, I'd love to use wasd, but those are all the most useful keys!

Quote
A generic 'use' key for all items is not compatible with items that have multiple uses, and since I want the complexity of items with multiple uses, I will not be supporting a generic 'use' key.  There are games for which it's appropriate.  Mine's not one of them.
How often are you going to want to eat a scroll or read a potion, though? Personally, I prefer the simplicity of a single use key, since 90% of items naturally have only one use. But, even for items that do have more than one use, you can still have a single use key which brings up a menu of options on how exactly to use the given item. Menus are good, they work well and people seem to like them.

Quote
I think that a good interface saves the player from making boring keystrokes whenever possible.  For example repeating an attack you've already made once should not take more than one keystroke unless you've run out of that kind of ammo or charges or mana, you've had that weapon or wand or whatever taken away, the target has died or fled out of targeting range, or something else has happened that means you can't exactly repeat it anymore.
I think a good interface is simple to learn and remember, and quick to use. I like minimalistic interfaces.

ido

  • Rogueliker
  • ***
  • Posts: 618
  • Karma: +0/-0
    • View Profile
    • Tame Tick
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #36 on: September 16, 2010, 10:48:37 AM »
How often are you going to want to eat a scroll or read a potion, though? Personally, I prefer the simplicity of a single use key, since 90% of items naturally have only one use.

Well, for a lot of people a lot of the enjoyment they derive from nethack is due to creative "eat a scroll" type of solutions.

But I agree that menus are more discoverable than just having a ton of key bindings.

Slash

  • Creator of Roguetemple
  • Administrator
  • Rogueliker
  • *****
  • Posts: 1203
  • Karma: +4/-1
    • View Profile
    • Slashie.net
    • Email
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #37 on: September 16, 2010, 03:16:11 PM »
A lot of netbooks don't have numpads, and although it is easy to buy one, it's very convenient to have SOME way to move without a numpad. I've been thinking about using unused keys like p[] l;' and ,./ or some other combination, but I've never actually tried it.

p[] l;' may be laid out in a non ortogonal schema on international keyboards, it may not make sense in a spanish one like mine, for example... plus some language may have trouble reading those special keypresses, probably...

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #38 on: September 16, 2010, 09:00:22 PM »
Quote
hjkl-controls ...
I think the most sensible solution (that I know of, anyway) is to default-enable movement by keypad, arrows as well as hjkl, and allow players to configure their own keybindings if that is desirable. It seems like the closest we'll get to having our cake and eating it too.

Concerning edible scrolls and readable potions ... I agree with the sentiments expressed by Elig. Proponents of big command sets often mention the possibility of complex item interaction. That may be so for Nethack, which I haven't really played, but classics like Crawl and ADOM, at least, have way too complex command schemes for what you can actually do. For most RLs, striking the balance between "generic use command" and "a gazillion commands for superspecific situations" is easier said than done, however.

Maybe we could learn from old adventure games in this department, ie. employing "use A with B" to provide complex item interaction, as well as throwing in a few generic commands (throw, give, push/pull).

By the way, a game with edible scrolls would totally rock.

As always,
Minotauros
« Last Edit: September 16, 2010, 09:11:12 PM by AgingMinotaur »
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #39 on: September 17, 2010, 05:39:46 AM »
I think the arrow+some control key is working quite nicely. I find it quite intuitive to use shift with left/right arrows to move northwest/east and ctrl southwest/east.

I also made ctrl and alt affect up/down arrows which give the same result, but with left side (ctrl) and right side (alt) keys changing up/down move.

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #40 on: September 17, 2010, 07:14:53 PM »
Just a note, but if you decide your game works fine with four-directional movement, your problem is solved because the arrow keys are all anyone needs in that case and pretty much every interesting device has them.  Before you spend too much sweat on numpad vs. vikeys you should at least consider that option.

The main drawback to the number pad for 8-directional movement, as people have pointed out, is laptops without a number pad.  But there's a simple workaround.  I mapped the digit characters, rather than the numpad itself, to movement commands.  So, if you want to play on a laptop with no numpad, you can -- you just have to use the top-row numbers as direction keys.  This is not great, but the alternatives, as I see them, are worse.

Eight lower-case letters for the vikeys, out of only 26, considering that lower-case letters are the easiest commands to enter, is too big a price to pay. And if the vikeys don't make sense to me on a US keyboard, imagine how much nonsense they make to people on other keyboard layouts. The number keys are at least consistent in layout from one keyboard to the next.



Darren Grey

  • Rogueliker
  • ***
  • Posts: 2027
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #41 on: September 17, 2010, 10:22:34 PM »
Alas there are too many die-hard vi-fanatics...  Laptops are a big problem for roguelikes though.  Only easy solution is four directions only.  One thought I came up with before is using 789/UIO/JKL (the capitals) so that you have an effective numpad with the caps lock on.  Enable &*( as alternatives to 789 and you have move with the Shift held.  Only problem is that on some keyboards the three lines are somewhat out of sync and the directions feel less natural.

With regards to generic use vs specialist commands, why not have both?  Simply make the generic use command perform the default action for that item type (drink potions, read scrolls, equp armour, wield weapons) whilst retaining specialist commands for times when you want less inventory scrolling or when you want to do something odd.  I imagine many players will use the generic use button 95% of the time.
« Last Edit: September 17, 2010, 10:25:16 PM by Darren Grey »

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #42 on: September 18, 2010, 12:14:22 AM »
Just another thought on complex key bindings: I don't actually believe that complex item interaction needs a complex interface to work. But the developer will have to get imaginative in new ways. Some examples:

Let's say you want a "Jerome and the lion"-like encounter in the game: A monster/animal with a thorn stuck in a paw. The point is for the player to relieve the beast, who might become some kind of helper. You would add a prefix to make the beast stand out (something like "angry lion" instead of just "lion") and a unique description mentioning the thorn. In a game with a complex key set, you can add a proper command for the situation, something like "Ctrl-P" for "pull out small things that are stuck in bigger things". In a simpler interface, you'll have to emulate the action in a different way. One solution would be to decide that any action that heals the lion results in a message that describes how you remove the thorn and gain a friend for life. Based on current stats and equipment, the player might want to hurl a healing potion at the critter, or apply a first aid skill, etc.

Edible scrolls: In a complex interface, trying to eat a scroll will almost invariably result in a "You can't eat that"-message, but a few special scrolls may be edible. Discovering an edible scroll will of course be a kick, but it may not make up for the hundreds of fruitless efforts to apply every possible verb to every possible item. With a context menu, it becomes less grindy, but also less interesting. Choosing the scroll from your inventory suddenly gives you two options ("eat" or "read") instead of the usual single option ("read"). Obviously, most players will originally intend to read the scroll, but opt to eat it instead, since the possibility is there. Finding an edible scroll may be fun in itself, but the thrill of discovering a hidden property, solving a puzzle, is lost. A more elegant solution might be to add special cases where you can turn something into an edible object. For instance, let's say there is a baker in the village, with a patch of sourdough in his house. Dropping or throwing the scroll into the dough means that the next bread you buy from the baker will have some magic of the scroll, if applicable. This adds a tactical element, as the baker may not take lightly to people dropping random stuff into his precious dough, etc. It also adds a gamble, since baking stuff that's usable, but not edible, will incur a loss, as the item is destroyed and the bread is ruined.

There is also always the solution of adding special objects to perform special actions. That may be klunky in some instances, but it definitely has its uses. For instance, without an "inscribe" command, you might not be able to inscribe the dungeon floor with your sword, a magic staff etc. for special effects. But the developer can add something like a "magic chalk" to inscribe other objects with, spawning a different kind of subgame. The possible complexity is still huge, if the same rune can yield different effects when inscribed on different kinds of objects. "Frost" rune inscribed on "wind" staff yields "ice storm", etc.

So you see, a simpler interface is always better ;)

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

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #43 on: September 19, 2010, 09:04:38 AM »
Just another thought on complex key bindings: I don't actually believe that complex item interaction needs a complex interface to work. But the developer will have to get imaginative in new ways. Some examples:

Maybe it was just me, but none of these examples seemed to illustrate anything about "I don't actually believe that complex item interaction needs a complex interface to work"

So you see, a simpler interface is always better ;)

I unfortunately, am not seeing  :-\

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Project(?): creating a standard for keyboard controls in roguelikes
« Reply #44 on: September 19, 2010, 02:59:29 PM »
Maybe it was just me, but none of these examples seemed to illustrate anything about "I don't actually believe that complex item interaction needs a complex interface to work"

I think I second that sentiment.  These examples were all cases of substituting situational complexity for interface complexity.  The problem with that is that situational complexity does not favor creativity; it only favors memorizing and repeating the developer's creativity. 

The interface is supposed to let the player do whatever s/he wants to do in order to solve game problems.  If a player has thought of eating a scroll, s/he shouldn't have to try to figure out how to get an excessively simple interface to let him/her do it.  Having the scenario with a baker is forcing a player to make a subgame out of overcoming an interface problem, and it isn't even a fun subgame.  It's just a scenario that will wind up in a spoiler file.

These are not flexible tools for solving new or random problems; these are merely puzzles to be solved once. The solutions would just find their way into a spoiler file, and that would be the end of it.

So you see, a simpler interface is always better ;)

Hmmm, no.  The simplest interface is the one on a screen saver, and a screen saver is not much fun because you can't do anything.  I think that unnecessary complexity is a problem, but then we have to decide what is unnecessary.  A good example of unnecessary complexity in a roguelike game, IMO, is separate wear/remove commands that apply to clothes, jewelry, and armor.  The interface should be complicated enough that the player can command the character to wear things; complication beyond that point is unnecessary and therefore bad.

Bear