how do you manage different control schemes?

Discussion and feedback on Construct 2

Post » Fri Nov 04, 2016 1:19 pm

Hello everyone,
while developing my own game I came accross this problem: since each player plays with different devices with different input methods, there's the need to support different controls schemes.

These are different input methods like keyboard, gamepad, mouse and touch.
For some of these there's also an input mapping which basically assigns a certain input (keyboard key "A" or gamepad button "1") to a game command (such as "jump");
Also some players may want to customize input command so they won't be forced to use the default scheme (such as WASD+SPACE combination)
Also there is the need of a customize control interface which allows to assign to each player a control scheme, customize it (if possible), viewing which inputs are binded to which command ("A" = "jump") and also avoiding two different players to use the same scheme or even two schemes to have some inputs in common.

I already solved this partially by programming a proper event sheet with some variables (the customize controls interface is yet to be done) but now i was wondering if there's a behaviour/plugin/game template that helps solving this problem common to many games, and if not, would you find it useful to make one?
Also, how did you solved this problem?
B
9
S
4
G
1
Posts: 32
Reputation: 871

Post » Fri Nov 04, 2016 1:47 pm

So if I get this right, you want to a create a custom control setting function for your game. Just get the keycode or pressed button (from a gamepad) using expressions and store the value in a variable. Then you can build up your system around these expressions.

https://www.scirra.com/manual/113/keyboard
https://www.scirra.com/manual/143/gamepad
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Fri Nov 04, 2016 8:03 pm

Yes glerikud and thanks for your answer but I was also thinking about making a game template ready to be implemented in a game to help anyone with that task, what do you think about it?
B
9
S
4
G
1
Posts: 32
Reputation: 871

Post » Fri Nov 04, 2016 9:04 pm

I made one for gamepad first for my game and later a mouse control schematics for it too. Keyboard utilize the nearly the same schematic as gamepad does but with the significant difference of customization. It's is actually pretty hard initially since I have to slowly iron out the bugs and make it smooth to use with little prior experience but all later changes (including mouse implementation) is done in a few days due to better understanding of how to design a gameplay flowchart (as in if the player press this, this does what? sort of thing).

Controls schemes aren't that hard to do considering most games don't suddenly change their gameplay and most don't do RPG. Obviously, fighting and brawl games have to include timers and arrays into their control functions and events to allow combos.

To display controls in your UI is pretty simple via keeping track of dictionary keys value which tell you what keyboard keys are set to what and then use a text font with a sprite to display that "name" that you set for that value. (Keyboard keycodes are kept in numbers, while you can get most of their names using StringFromKeyCode, some are undesirable so you will want to set the string for those yourself)

I am not sure if a universal control scheme is desirable or not since every game have different standards of UI and different uniform controls schemes for ease of gameplay.
Would be more advisable to rather create generic control schemes for specific types of game than a single one.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Sat Nov 05, 2016 2:15 pm

Walessio wrote:Yes glerikud and thanks for your answer but I was also thinking about making a game template ready to be implemented in a game to help anyone with that task, what do you think about it?

If you have the spare time, go for it. If you upload it to the tutorials I'm sure some devs will find it useful.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717


Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ and 15 guests