Custom Game Controls

Recently, I was thinking about user experience in Roblox. One thing that I’ve noticed is that most games define custom keys for special actions in the game. However, there isn’t a good way to change these settings. (you can potentially remap keys if you have a gaming keyboard, but then you have to have a mode-swap button if you chat…). This brings up two annoying limitations.

First, it is impossible to choose controls that everyone likes. It might not even be possible to choose controls that don’t conflict with similar actions on other popular games (including non-roblox games).

Second, certain control inputs can’t be used. For example, side mouse buttons exist on gaming mice but cannot be used. Even if they were exposed as button4, button5, etc… it wouldn’t be safe to assume the user had them.

I was wondering if it would be possible to get custom control schemes into roblox games in any good way. Something that takes little effort to implement and works well for the end user.

7 Likes

It would be interesting to have an option when binding CAS actions that would let users remap a key to that action in the esc menu.

The menu would have an extra tab showing all the CAS actions that are able to be rebound and the user could then change them.

Are you referring to ROBLOX controls (chat key/etc), developer-implemented controls (i.e. cast fire bolt), or both?

YES. I have several custom keyboard and house binds [I have a razer setup with bindkeys] and it sucks that they don’t work in-game. I’d love to see possibly a way to create your own binds [unless the game developer has that set otherwise].

I really want ROBLOX to open up some kind of SetCore API to specify custom controls.

4 Likes

If I ever make something like a FPS or something where keys matter, I got something planned:
Basicly a Keyboard menu where you can assign keys to actions (wow, much thought, such idea).
Only, I would not just listen to a key, but any InputBegan thingy.
Gotta think about dem controller freaks.
(And it’s just nice that you can assign F, G, or a button on your controller)
(If you can turn extra buttons in your mouse into a virtual controller, you could even use those)

1 Like

I think the best solution would be an api like this:

-- Declare and bind the Sprint command through CAS
cas:BindAction("Sprint", func, false)

-- Make the Sprint command appear in a core keybind menu.
-- If the user has never explicitly bound anything to a command called "Sprint"
-- then LeftShift will be used to trigger the action.
-- If the user has bound anything to any command called "Shift" in any game
-- then that key will be used instead.
cas:DefineUserBinding("Sprint", Enum.KeyCode.LeftShift)

-- Get the user binding so that it can be displayed in guis etc
keycode = cas:GetUserBinding("Sprint")

This way the user has the ability to change their global “Sprint” binding, developers can individually set defaults, and the api can be used for the default character controls.

1 Like

Would these custom settings save? If so, how? Are they globally saved for all games or are they only saved per different game/universe you visit? I would imagine a global save, however that would come across issues with me liking one keybinding in one game, then going to next and end up grenading myself because G doesn’t heal, it throws a grenade.

Cool idea though, would like to be able to bind emotes to keys so I can press H and my little avatar would wave.

I’ve thought about this quite a bit. There are a lot of small details. As a user, I like the idea of being able to use all of my keys/buttons. Something that is difficult if games have fixed controls.

My initial thoughts would be to give developers some control pane in the esc menu. I like the idea of saving controls on a per-place basis. That said, I like the idea of having at least some common control types that are the most used and keeping track of these so users can quickly update settings for new games. Eg, “zoom” might occur in multiple games, so a game might provide a default of “Mouse2” and I might provide a default of “Mouse5”. The settings gui could then highlight the settings I probably want to change.

There are issues though. If settings are saved locally, players can’t move between computers easily. If they are saved online, new computers might not have the same buttons. (eg, a laptop might not have a keypad. A MMO gaming mouse with 16+ buttons might not exist, etc…) To some extent, the same issue occurs with a single computer if the hardware is slightly changed.

–added: Also, there are some other complications with conflicting controls. For example, games can have different controls for vehicle mode vs normal mode.

1 Like

Yeah, I’m not sure how well allowing the user to control all keybinds in general would work as a complete solution because of the reasons you mentioned. Here are my thoughts on what should happen:

  1. CoreGui menu gets a tab for configuring keybinds, and users are able to configure ROBLOX keybinds that are tucked behind corescripts (e.g. record/screenshot keys)
  2. Developers are able to invoke an API method that adds a keybind to the CoreGui menu that players can then configure
  3. Initially-collapsed area that can be opened by clicking on “Advanced Customization” in the keybinds tab that allows players to reroute keys to whatever they want – there would be a “player” subsection (active when not sitting in a VehicleSeat) and “vehicle” subsection (active while sitting in a VehicleSeat)

Enabling players to configure keybinds in the ROBLOX menu will make it easy (always in the same place in any game) to find, easy to use (behavior doesn’t differ across games), and potentially saves the developer from having to implement an ugly second menu because the Esc key is already bound to the ROBLOX menu.

Enabling developers to hook up their games to keybinds that can be configured by players in the menu will result in generally all top-quality games and some other games allowing players to have entire customization over their keybinds since ideally all they’d have to do would be to replace (if key == Enum.KeyCode.E) with (if key == KeybindService:GetBoundKey(“Use”))

Finally, enabling users to dig into advanced customization and reroute keys behind the developers’ back ensures that users are mostly able to control keybinds even if the developer hasn’t bothered to allow them in their game. The only weaknesses of this are 1) Vehicles may still not be run off of VehicleSeats meaning the Vehicle section wouldn’t work, 2) Aircraft may use VehicleSeats so vehicle controls under this section would apply to and conflict with aircraft controls, 3) Other scenarios like GUIs where keys behave differently. It has essentially the same problem that you mentioned, but it at least would help in general. If this behavior is too unpredictable for a ROBLOX CoreGui element though, I don’t see much harm in omitting it, especially as mostly only power users would use this.

2 Likes

I would love being able to remap Roblox’s controls and I even thought about how I could replicate something like this recently. In my game that I’m working on I already have custom key bindings(since it’s a 2D game everything can be customized) and it’s really nice because it allows people to do whatever they want with my controls. Of course I still need to have a warning be displayed if they duplicate controls on the keyboard or the same gamepad.

1 Like