Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)
But I think it is quite an effort to implement it properly.

Yeah, it can be a bit of a pain to have keys be fully configurable.  An easy compromise might be to have a set of keysets you choose from at the start of the game, and then you just read those to get the key you want.  So, instead of doing something like:

//    Checking for moving left:
if (event.keyCode == ROT.VK_NUMPAD4) { move( -1, 0 ); }

...in your code, you would instead do something like:

//    Somewhere during startup:
var numpadKeySet = { keySetName: "Numeric Pad Keys", left: ROT.VK_NUMPAD4 };
var arrowKeysKeySet = { keySetName: "Arrow Keys", left: ROT.VK_LEFT };
//    When the user selects a keyset:
var currentKeySet = arrowKeysKeySet;
//    Checking for moving left:
if (event.keyCode == currentKeySet.left) { move( -1, 0 ); }

Then, you could set a different keySet depending on the type of key bindings you want, and the behavior is abstracted away.  Later, you could have a functionality that would let players define a custom keySet.

Do you know if the rules of the 7DRL-Challenge allow me to update my game by additional controls after the deadline?

There's another thread in the 7DRL forums about this you can read for more detail, but the short version is that it's okay to update the game as long as it's clear and feasible how the 7DRL reviewers can play the end-of-compo release version.  So you could update it, but be sure to leave the original release version up and clearly marked for reviewers.

Thank you for the very detailed explanation Lone Spelunker. Good idea to have the different predefined keysets to choose from. I will see if I could implement this during the next weekend. What could a possible alternative to the numpad look like. Do you think [q], [w], [e], [a], [d], [z], [x], [c] could be a proper choice? I do not want [s] to skip a turn since a lot of people are use to the [w], [a], [s], [d] controls and therefore would accidentally skip a turn when they want to move southwards. So my choice for skipping a turn would still be [.] as for the vi-keys.

Since my game is playable in browser, I cannot provide two different downloads in order to keep the original 7DRL-version. So I think I will need to host a second game page for the updated game and link to it from the original 7DRL-game-page.

Well, maybe you could do a keyset based around I-J-K-L as the cardinal directions? Or maybe I-J-L-comma? And I think W-A-S-D could actually work if you make space be the pauser.

You know, another option would be to just support screen clicks on the display.  That would solve a lot of the issues for people using laptops.

Deleted 5 years ago
(1 edit)

Sorry for the delay but I finally managed to implement your idea with the different keysets.

Deleted 5 years ago
Deleted 5 years ago
Deleted 5 years ago
Deleted 2 years ago