"Any-setup keys": so every player can play your game, whatever their CPC or emulator

Hi all,

Many CPC games are great, and yet a good share of players cannot play them comfortably. Not because of the game itself, but because of which keys it listens to. I touched on this in Why make such great games if most people can’t play them properly?, and I’d like to go further: describe the issues, and propose a fix.

The goal: player comfort

Every player comes with habits, and a game is comfortable when it fits them. For example:

  • left hand for left/right and right hand for up/down, or the contrary;
  • a diamond under one hand;
  • the cursor keys;
  • a joystick;
  • fire near the thumb, or under the little finger.

A game that accepts only one of these habits forces everyone else to retrain their hands, or to give up. A game that accepts all of them at once needs no key redefinition: each player just plays the way they already do.

What goes wrong

Even a game that offers good keys can lose them on someone else’s setup.

Letters that move. WASD, QAOP and friends assume a QWERTY keyboard. On AZERTY (French CPCs, French PCs), A and Q swap places, so do Z and W, and M moves. On QWERTZ (German PCs), Y and Z swap. A game played with QAOP becomes a puzzle on a French keyboard before it even starts.

Keys an emulator has to put somewhere. COPY, CLR and the keypad’s f0 to f9 have no obvious place on a PC keyboard, even less on a laptop. Today I tried My Roland, a work in progress, where jump is on COPY. Depending on the emulator, COPY ends up on Alt or on Insert. I’m not even sure I’d call it barely playable.

Layers in between. Between the player’s finger and your game there can be: the host keyboard layout, the operating system, a browser, the emulator’s mapping (by position, or by symbol, which Arnoldemu calls “translated”), sometimes a remote desktop. Each layer can move a key. Reading physical key positions would solve part of it, in a sane environment; in many setups the interface just doesn’t provide them, and the program only learns which symbol was typed.

In a browser it can get worse. With Firefox’s “resist fingerprinting” setting, the page is told the keyboard is a standard one (probably US) whatever it really is. I tried an in-page CPC emulator that way from a French keyboard: all letters were fine, but digit keys gave wrong characters or nothing at all, and I could not even type a " (details).

The result: a game works perfectly on its author’s setup, and is awkward or unplayable on someone else’s.

A proposed fix: any-setup keys

I call it any-setup keys: a key set that suits every player, whatever their habits and whatever their setup: real CPC of any language, desktop emulator, web emulator. Two rules, the first one above all:

  1. Use only letters that stay in place. These are at the same place on QWERTY, AZERTY and QWERTZ: B C D E F G H I J K L N O P R S T U V X. Avoid A Z Q W M (they move on AZERTY) and Y (swaps with Z on QWERTZ). A letter from that list is found whether the emulator maps by position or by symbol.
  2. Give each important function several keys, including keys every keyboard has. Action on fire, space bar, RETURN, ENTER and COPY. Menu or pause on ESC, second fire, and P for compatibility with the GX-4000.

How to choose those several keys: suit every habit at once. Joystick, cursor keys, one hand per axis in both directions, a diamond, the key clusters players already know; fire under a thumb and under a little finger. Nobody has to redefine anything: launch and play.

No key redefinition routine to write. Players don’t need to redefine anything, so you don’t need to write, test and find memory for a redefinition menu, and players don’t need to go through one before playing. Nothing stops you from offering one too, but no player should need it.

Example: the key set of Just Get 9

Here is what Just Get 9 accepts, all at the same time:

  • Move, whichever suits your hands:
    • cursor keys
    • joystick 1 or joystick 2
    • one hand per axis, either way round: left hand on V/B for left/right with right hand on O/K for up/down, or left hand on D/C for up/down with right hand on H/J for left/right
    • a diamond under the right hand: U up, N down, H left, J right
    • a ZX-style line: 4 left, 5 down, 6 up, 7 right (the ZX Spectrum’s 5678 moved one key left, so 5 and 6 keep their joystick 2 meaning)
    • Amstrad’s joystick 2 keys: 6 up, 5 down, R left, T right
  • Action: under a thumb (space bar, COPY, ENTER), under the right little finger (RETURN), under an index finger (G, Y for “yes”), or fire
  • Menu: second fire, ESC, P (the GX-4000’s pause button), F (joystick 2 second fire)

Where two schemes share a key, they give it the same meaning, so mixing them never surprises you. Drawn on a CPC6128 keyboard (● action, □ menu):

┏━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┳━━━┓
┃ □ ┃   ┃   ┃   ┃ ← ┃ ↓ ┃ ↑ ┃ → ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃
┣━━━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━━━╋━━━╋━━━╋━━━┫
┃     ┃   ┃   ┃   ┃ ← ┃ → ┃ ● ┃ ↑ ┃   ┃ ↑ ┃ □ ┃   ┃   ┃     ┃   ┃   ┃   ┃
┣━━━━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┳━━┻┓ ●  ┣━━━╋━━━╋━━━┫
┃      ┃   ┃   ┃ ↑ ┃ □ ┃ ● ┃ ← ┃ → ┃ ↓ ┃   ┃   ┃   ┃   ┃    ┃   ┃   ┃   ┃
┣━━━━━━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━┳━┻━━━━╋━━━╋━━━╋━━━┫
┃        ┃   ┃   ┃ ↓ ┃ ← ┃ → ┃ ↓ ┃   ┃   ┃   ┃   ┃   ┃      ┃   ┃ ↑ ┃   ┃
┣━━━━━━━━╋━━━┻━━┳┻━━━┻━━━┻━━━┻━━━┻━━━┻━━━┻━━━┻━━┳┻━━━┻━━━━━━╋━━━╋━━━╋━━━┫
┃        ┃  ●   ┃               ●               ┃     ●     ┃ ← ┃ ↓ ┃ → ┃
┗━━━━━━━━┻━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━┻━━━┻━━━┻━━━┛

Two honest exceptions in that set. Y breaks rule 1: on QWERTZ it simply does nothing, and there are six other action keys. The digit keys need Shift on an AZERTY keyboard: fine on a real CPC and with positional mapping, but they can fail in a web emulator, as in the “resist fingerprinting” case above. That is why they are never the only way to move.

Do players need to be told all this? Just Get 9 does not even mention it in the game; the README in the download has the list and the diagram above, and nobody has complained. Players that have specific habits explore the keyboard and find something that works for them.

Your turn

  • If you write games: please consider an any-setup key set. Just Get 9’s is one example; yours can differ, as long as it follows the two rules.
  • If you play: which games gave you trouble on your setup (keyboard language, emulator, web emulator)? Which ones just work? I’d like to collect these, and maybe turn the result into a CPCWiki page.
  • If you write emulators: that is a related but separate topic, symbol-based key mapping. I wrote about it in Introducing in-page emulator on wiki pages.

Thanks for reading, and happy (any-setup) playing!

7 Likes

That is a seriously impressive post!

And I agree with it, it would be great if games made now offered as many different control schemes as possible.

and using the joypad plus fire1 and fire2 means that it works on the GX4000 without any problems.

1 Like

Yeah, I make all my games now have fully redefinable keyboard controls, as well as joystick/controller equivalents. I reuse the same modules and methods for doing so across games, optimising and improving as I reuse them.

2 Likes

Honestly I think a redefine key option is simple, flexible solution and doesn’t really take up much memory.

4 Likes

I agree, but for the console there needs to be an option where you can start the game without a keyboard by default.

2 Likes

A key scheme like this makes keyboard configuration easy - there simply is nothing to be configured, one can directly start a game. But there are two additional things to consider:

  • If a game loop is really time consuming, then it might help if as few keys as possible are tracked, just to save a bit of computation time, although it will not be much.
  • It would need a close examination, but the more keys are considered, the more ghost keys can sneak in. This will usually not happen on an emulator, but on real hardware this can be a problem.
1 Like

Absolutely, but this isn’t too difficult. I just went with “Fire to start/ESC define keys”. And made it so you couldn’t define the ESC key as your fire button and get stuck. I don’t think anybody needs to use ESC to fire. When you’re using a joystick you can jump straight in.

One of the advantages of a redefine key option, apart from being maximally flexible, is it also clears up any ambiguity about what the keys are. The above control scheme is quite complicated to explain.

4 Likes

100% agreed. Keys should not be a precondition for any game that doesn’t require them during the actual gameplay.

As a minimum Joystick control always should be present and fire should always be the option to start a game. Best combined with a typical set for alternative keyboard control which can be redefined for those that prefer a different set or need to deal with one of the many issues that come with how emulators map keys.

1 Like

Thanks all for your feedback!

TL;DR: a game is a kind of show, it must run as smoothly as possible. Also the surprising choice in Ritman and Drummond’s Batman and similar isometric games.


When I played on my CPC I overwhelmingly preferred games that allow to redefine keys.

I might do that for my later game(s). Simplicity is desirable still.

Yes, excellent approach! Do you allow several keys for the same action?

Well, since the emulator imitates keypresses on the virtual keyboard of the emulated CPC, you always get the CPC-side ghosts, and perhaps some more issues with the emulation setup.


:keyboard: By the way, the wiring of the CPC keyboard was chosen to avoid ghosts for the joysticks, but not so much for the arrow keys. Did you know that pressing left arrow, up arrow and copy, it causes a ghost “right arrow”? You can check that in any CPC or emulator: switch on, quickly press left,up,copy then release. Without a ghost the cursor would be on the rightmost column, instead it is on the R of ready.

That might be one argument for a fixed layout, well studied to avoid ghosts.
Or a “redefine keys” routine that warns the user about ghosts and suggest solutions.


Do you remember the strange menu interaction in “Batman” (and similar games by the same team)?

  • Throughout the menu, ENTER to select option (actually the big main RETURN key, not the ENTER of the numeric pad).
  • Any key to move cursor (downwards).

  • When redefining keys, SHIFT to finish.
  • One good thing, for each of the actions (directions, jump, carry, pause) you could define many keys.

I understand that it has a property that whatever the setup, if you can press Enter and enough other keys, you’re good.

But, it was clumsy to navigate, required many keypresses to redefine the keys, and you had to go through that on every game load to define keys or adjust the sound (the default option, well-named “nasty”, had this continuous melody while you walked all the time), and the “sensitivity”. I found it so strange and like a chore to do again each time the game was loaded.


Back to a more general view, I don’t really know how much of a constraint it is for the player that a game offers a fixed yet multi-habit-many-keys layout like I did on Just Get 9 and suggested in the first post of the topic. No one commented this so far.

Plot twist: when I tested Just Get 9 in browser on an Android phone (so, without a keyboard), the Android on-screen keyboard did not offer arrow keys, but I could type letters and press “Enter” to send them and it worked. :sweat_smile: .

1 Like