10-09-10 - Game Controls

I'm playing a bit of Xbox 360 for the first time ever on the loaner box from work (side note : jebus it makes a hell of a lot of racket, the DVD is crazy loud, the fans are crazy loud, it's pretty intolerable; I also get disc unreadable errors semi-frequently which I guess is because the work box is screwed, but between this and the Red Ring problems, I can only conclude that this console is built like a piece of shit, just epically bad manufacturing quality).

Anyway, one thing that I find very depressing is that the games have almost uniformly bad basic controls. This is the most fundamental aspect of any game and you all should be ashamed that you don't do it right.

Perhaps the most frustrating and unforgivable of them is that so many games just drop inputs. This happens because the game or the player is in some kind of state where you are not allowed to do that action. The result is that they just lose the button press. eg. say you have a jump and an attack. You can't do them at the same time. I jump, and then right about the time that I'm landing I hit attack. That needs to work whether or not I hit the attack button right before I land or right after I land.

There are various ways to do this, but an easy one is to store a little history of all inputs that have been seen in the last few millis (200 ms or so is usually enough), and whether or not they have been acted upon or not. Each frame, you act not just on the new inputs that are seen that frame, but also on inputs seen recently that have not been acted upon.

For doing things like "holding down A makes you sprint" , you need to be checking for button "is down" *not* the edge event. Unbelievably, some major games do this wrong, and the result is that they can miss the "is down" event, so I'm running around holding A and I'm not sprinting. (even if you do all the processing right as above, the player might press A down during the inventory screen or something like that when you are ignoring it).

For simultaneous button press stuff, you also need to allow some slop of course. Say you want to do something when both A and B are pressed. When you see an "A down" event you need to immediately start doing the action for A to avoid latency, but then if you see a "B down" within 50 millis or whatever, then you need to cancel the A action and start an "AB simultaneous press" action.

One pretty bad trend is that lots of people are using something like Havok for physics and they run their player motion through it. They are often lazy about this and just get it working the same way one of the Havok demos did it, and the result is incredibly janky player motion, where you stutter, get caught on shit in the world, etc. There's a mistaken belief that more finely detailed collision geometry is better. Not so. As much as I dont' really love the old Quake super-slidey style of motion that feels like the world is all greased up, it's better than this stuttering and getting caught on shit. The player's collision proxy should be rotationally symmetric around the vertical axis - you shouldn't be able to get stuck on junk by rotating. A vertical lozenge is probably the best player collision proxy.

A context-dependent generic "action" button is a perfectly reasonable thing to do and lots of games do it now, *however* it should not be one of your major buttons. eg. when you are not at an "action" location, the action button needs to do something pretty irrelevant to gameplay, eg. it should not be your "jump" or "attack" button or something important. That is, just because you're at an action location, you shouldn't lose the ability to do something major that you

Automatic lockons for combat and such are okay, but you need to provide a way to get in and out of that mode, or a button to hold down to override it or something. Specifically, you should never take over control of the player's movement or camera without their having some ability to override it.

It's well known that for 1st person games you need to provide an "invert look" option, but IMO it's just as important to provide inverts for 3rd person cameras too, not just up-down but also left-right. Everyone has a different idea of what the right way for a 3rd person camera to move is, so just expose it, it's fucking trivial, do it.

It's very depressing to me that devs don't spend time on this basic shit.

It basically comes down to an incorrect philosophy of design. The incorrect philosophy is :

we have given the player a way in which it is possible for them to make the character do what they want

the correct philosophy is :

the character should at all times do what the player obviously wants it to do

and any time you fail in that, you have a major deficiency that should be fixed. Any time you see someone press a button and the character doesn't do what they wanted, don't coach the player on how to do it right - fix it so that the game just does the right thing.

A couple other minor points :

You have to be careful about the keys that you use in your menu system and what they do in the game world. This is a general important UI issue (on mouse-based interfaces, you should be aware of where buttons on popups lie on top of buttons underneath them - the issue is if a user clicks the popup multiple times and it disappears they may accidentally click beneath it, so don't put a "delete all my work" button under the popup).

In games in particular, if you have A = okay and B = back in your menu system, then you should make sure that if the user is hammering on "B" and comes out of the menu system and applies to the game world, that it won't fuck them.

Context-sensitive and tap/hold buttons and modifiers (eg. hold R1 changes the action of "A") are all okay for overloading, but *modal* controls are never okay. That is, if I press R1 it changes my mode and then my buttons do different things. Modal controls are absolutely awful because it removes the players ability to act from muscle memory. It means I can't just hammer on "A" in a panic and get the expected result, I might wind up doing the wrong thing and going "fuck I'm in the wrong mode". Even worse are modal controls where the mode is not displayed clearly on screen in a reliable place because the game is trying do an "immersive" HUD-less interface.

I imagine most people would agree that modal controls are terrible, but in fact many games do them. For example any time you press a button to go into a selection wheel for spell casting or dialog or something like that it's a modal control (a better way to do this is hold the button down to bring up the wheel, but really selection wheels are pretty fucking awful in general).

That is, for each action in the game there should be a unique physical player motion. eg. "fireball" should be hold L1 , dpad up, release. Actions should never move around on the wheel, they should be in a reliable place, and there should never be any conditionals in the action sequence to do a certain action.

Another type of modality is when certain actions are not allowed due to some state of the world. eg. maybe you're near friendlies so your attacks are disabled, or you're in a cut scene so you can't save. Again most games get this wrong and don't correctly acknowledge that they have created hidden modes that affect input. The modes need to be clearly displayed - often there's no reliable way to tell you are in a certain mode or not, for example a cut scene needs to be clearly separated from normal gameplay (eg. by bringing in vignetting or letterboxing or something) if it changes my ability to use controls. If I can't do my attacks or sprint or whatever, I should at least get some ackowledgement from the game that it received my input, and it's just not doing it.


ryg said...

"jebus it makes a hell of a lot of racket, the DVD is crazy loud, the fans are crazy loud, it's pretty intolerable"
The new ones finally fix this (fan and DVD both). Not sure how they're looking RROD-wise.

Apropos muscle memory: A lot of action mappings are "standard" to the point that any deviation from them is just going to confuse / disorientate / annoy the player. Left analog stick is character movement. If the player can control the camera, that's right analog stick. If your character can jump, it belongs on the bottom "action" button ("A" on 360 pad, "X" on Playstation-style controllers). "A"/"X" is "confirm" in menus, "B"/"O" is "abort/cancel" (X/O have switched roles on Asian Playstations - argh). "Start" brings up the pause menu. Both the D-Pad and Left Analog stick can be used to navigate menus. If you deviate from any of this, you better have a good reason, and you need to give the player some serious time to adapt.

On the PS3, slipping me a Sixaxis-quick time event without announcement is a quick way to make me angry. Like most players, I tend to have the controller lying in my lap, usually not upright (which is the "neutral pose"). If I don't know that a Sixaxis section is coming up (which, to add insult to injury, usually tends to be a balancing section, which are only annoying and never ever fun) I'm likely to screw up the first attempt royally. Also, all the motion-sensitive controls are laggy as hell and HUDs are usually awful at telegraphing what the hell I'm even supposed to do. Am I supposed to move in the direction indicated, or away from it? Both variants are about equally common.

Also, on PS2/PS3 controllers, all buttons are actually analog. This is kinda cool, but if you use the pressure information, better make it very clear that you do (multiple times!), because people aren't expecting it.

If you have some combo system, give the player a chance to practice combos in a setting where they can see the right button presses while they're doing them. If you have complex combos that require you to hit buttons with exact timing (e.g. you have both X, Y, X and X, Y, pause, X which do different things), display on-screen what you're parsing the input as! You may know how long a "pause" is from muscle memory because you've been playing your game for a year, but don't expect others to.

MH said...

Insomniac does the input history thing and it feels really good.

Also, virtualize your inputs and allow remapping. You'll have to to sell in Japan and Korea anyway, and the disabled gamers will love you.

I also think FPSs should expose their stick mapping functions and allow people to pick which ever one they like, along with toggles for things like snapping and such.

But no. "We've built an experience for the player and allowing remapping would ruin it.", which Ive heard, and is complete garbage.

MH said...

As for the rest of the input things like weapon select and such, Insom used to go through 4 or more schemes each game to get it right.

Actually, a lot of things follow the same cycle. Build, tune, rebuild, retune etc. People need to just plan for that cause itll happen anyway. If you dont youll get reviews about your game feeling sticky or just generally bad.

cbloom said...

"Apropos muscle memory: A lot of action mappings are "standard" to the point that any deviation from them is just going to confuse / disorientate / annoy the player."

Oh yeah, I meant to write something about this and then forgot.

This is particularly true when there is a dominant game of your genre on a platform.

eg. if you are making a platformer game for the N64 you better fucking just copy the Mario controls or your players will be upset and confused the whole time. If you are making a shooter for Xbox you better copy the Halo controls. Even if you really did come up with controls that are better (BTW you didn't) it doesn't matter, the value of staying the same is much greater.

Pretty much all of these points are really just basic general UI usability issues (eg. don't invent your own menu system for your Win32 app), but for some reason lots of games think it doesn't apply to them.

cbloom said...

"The new ones finally fix this (fan and DVD both). "

Oh yeah I was just reading about the Xbox 360 "S" , maybe I'll buy one of those. (ZOMG)

Jeff Ward said...

In terms of modals: I actually like that Dragon Age offers both modal and non-modal versions of its command wheel, partially because their command wheel is all about tactical decision making. While I'm in agreement about modes, I think that modals in tactical situations (or at least having the option to do modals) are actually under-used.

Everything else is spot on though. Definitely going to implement a input buffering system in my next game.

cbloom said...

I'm not explicitly opposed to modal per se. Particularly if it pauses the gameplay it's okay.

The thing that's really bad is *hidden* modal, where you get into different states and they aren't clearly shown.

Also realtime modal is pretty bad, though it can be okay if the player has a consistent way to get out of whatever modes they are in. eg. I want to do a melee attack asap, if I just hit X it might not do it because I'm in some mode, but if I hit BBBX it will get me out of all modes and do the attack, that's okay, it's at least consistent.

Nino Mojo said...

Great post, I'm with you on everything. Actually this is a topic that boils my urine so much that I could myself rant about it forever, and I feel like I must let some of it out:

Great offender in modal controls: Kingdom Hearts. Pressing UP or DOWN on the right analog stick changes the mode, like you can go from "fighting" to something else which I dont remember. Many times I hit the stick by accident during a fight and got my ass kicked by enemies because hammering the attack button produced nothing and it took me a few seconds to understand it. This is just unforgivably bad, and I wonder how fucked up design decisions like this end up in the end product, especially from big firms like Square Enix.

Also, one of the most depressing thing to me is how many games now have horrible latency, especially action games. Recent example: download the demo for Enslaved on the 360. The game feels something is finally happening on screen almost a whole second after I pressed a button, and yet they're trying (overly) hard to make it look/feel like the player's character is super lightning fast and powerful. Epic fail, I say.

cbloom said...

"Great offender in modal controls: Kingdom Hearts. Pressing UP or DOWN on the right analog stick changes the mode, like you can go from "fighting" to something else which I dont remember. ... "

Yup, that's exactly the kind of thing I'm talking about and it's total shit.

"Also, one of the most depressing thing to me is how many games now have horrible latency,"

Yup. Latency is unforgivable. One bit of common wisdom that people bandy about is that latency is bad in shooters but it's okay in RPG's or strategy games. That is a canard. It's okay of the strat game has some delay in implementing your command, but there should not be any latency in *recognizing* your command. I should at least get an instant beep or flash or something on my button click.

I highly encourage all game developers to test their games in a "single frame step" mode, there you can press space to single step a frame (and fake the clock to advance 30 millis or whatever). Then press your "A" button on one frame and single step to the next frame and verify that the response in that one frame is in fact what you want.

I gaurantee you will be shocked and surprised at what you see if you step through your game with single steps like this. You'll see animations popping and things sliding and stuttering and huge latencies.

Nino Mojo said...

Oh I just remember another awful example of what you described: the missed inputs. Little Big Planet.

It's the perfect example of doing the main character with the physics simulation rather than good old Mario style. At many occurrences, you'll press JUMP because you want to jump, but the physics engine/collision system doesn't quite agree that it's entirely "possible" to jump at this point and so you character either doesn't jump at all, or makes a crappy mini jump (like an inch high). * frustration*

I'm not a programmer (I do a little Blitz Basic and Game Maker on my spare time but I guess that doesn't count:), but I get your point about the single step test. Years ago I tried an emulator version of Mario 64 that was running very slowly, and it as cool to see that the character's position in space was sometimes moving before a change in animation was even display. Do what the player wants, then let the animation engine deal with it when it's possible/appropriate. The opposite of this is games like Flashback, in which you're depending on the animation reaching a certain frame in order for the game engine to register your next move.

You can call that a "style", but the result is that as much as I loved this game (and Out Of This World) back then, I can't really "play" it anymore now, I just watch it with nostalgia.

dust said...

Arg, I totally agree about button changes between Menu/Game fucking you up. I remember playing a JRPG at some point where Y translated to BACK on the Menu screens, but it mapped to MENU in the Game mode... Ahhhh, I wanted to kill whoever made that decision and not allowed me to change the layout. Which is another thing, changing Button/Keyboard/Mouse/Joystick layouts isn't really that hard, why the hell aren't we allowed to customize controls on consoles???

old rants