Thumbstick Studio: controlsKit 1.4.2
One line, every device. Controls.use("twinStick") and your game plays on a phone, a gamepad and a keyboard + mouse at the same time. Switch genre mid-game with one more call, and your game code stays the same, because every scheme speaks the same named actions (move, jump, fire, pause...).
Guides
Two guides ship inside the kit and install with it. Open one with the engine's guides tool at its address, for example guides { path: "controlsKit.package/how-to-add-touch-gamepad-and-keyboard-controls" }, or in the engine shell with zero guides read <address>:
- How to add touch, gamepad and keyboard controls to your game (
controlsKit.package/how-to-add-touch-gamepad-and-keyboard-controls): what to do first, picking a scheme, the shared action names, virtual joysticks and touch buttons for mobile, gestures, when touch controls show and hide, looks and button prompts, rebinding, and per-player input in multiplayer. It links the engine's own input guide for going deeper. - Example game, from an empty world to playable (
controlsKit.package/example-game-with-touch-gamepad-keyboard-controls-platformer-twin-stick-racing): install the kit from ZeroMind, build a small gem-collecting game with keyboard, gamepad and touch controls, then switch it from platformer to twin-stick shooter to racing with one change each.
What you get
- 9 genre schemes: platformer, twin-stick shooter, first-person shooter, flying, racing, real-time strategy, rhythm, card game, action RPG (click or tap to move, skill arc on touch).
- Built on the engine's own controls: on-foot schemes use the engine's walking map, racing its driving map, flying its walking + flight maps. Rebinding captures keys through the engine's own capture, and key clashes come from the engine's own check.
- Stays in charge: while a scheme runs, the kit holds the controls every time play starts, after edits and tests, and for every player who joins.
- Works with the engine's test tools: the simulated touch and action tools see and tap the kit's own buttons and actions.
- 6 on-screen sticks: fixed, floating, follow, 8-way d-pad, arcade, invisible drag.
- 6 touch button layouts: single, pair, diamond, radial wheel, hold-to-charge, action-RPG skill arc.
- Gestures: tap, double tap, long press, four swipes, pinch.
- Button prompts for keyboard, Xbox, PlayStation, Switch and generic pads, in two icon styles, picked automatically for the device in hand.
- 5 looks: minimal, sci-fi, cartoon, pixel, neon. All swappable live, one call each.
- Rebinding screen for keys, mouse and pad buttons with clash warnings and reset, and touch remapping: players swap on-screen buttons, mirror the layout for the left hand and pick their stick. Each player's custom bindings are remembered when they leave and come back.
- Phone-ready: 44 pt targets, safe areas and notches respected, touches land right at any render resolution, the kit's own menu and hints laid out around the sticks and buttons, and full-screen panels can hold the touch controls hidden while they are open.
- Multiplayer-ready: players come from your scene's player prototype, and each player's input moves their own character.
- Installs on its own. Checked by its own 58-test suite, here and in a fresh world.
Try it
This world opens on the gallery, which holds the whole kit: every scheme as a card with a Try it button, every stick, button layout, gesture, prompt set and look reacting together to your keys, pad or thumbs, a Rebind controls station, and a Walk around button into a two-player walk area where the live touch controls come up.
Install
Install controlsKit.package from ZeroMind (guid 889ac3ad-87d6-427a-8bc4-3e955943fa6c), then require("controlsKit.controls").use("platformer"), or drop the ControlsMenu component on any entity. Start with the guides, or the package README's first example.
New in 1.4.2
- The corner Controls button no longer sits on the engine's own Menu button on touch screens.
- Scheme actions can give a short
touchLabelfor their on-screen button, so long labels are not cut off.
New in 1.4.1
- Touch button clusters keep their shape: the kit no longer treats its own buttons (which it lists in the engine's touch layout for the test tools) as obstacles, which had drawn buttons on top of each other.
New in 1.4.0
- Remap touch controls: the rebinding screen's Touch layout row swaps two on-screen buttons, mirrors the controls for left-handed players and picks the virtual joystick; kept per player with their key bindings (
Controls.swapTouch,Controls.setTouchMirrored,Controls.touchSlots). - Camera look under a scheme:
ControlsMoverturns the orbit camera from the scheme'slookaction (mouse, right stick, touch drag). A live scheme stands the engine's own look down, so in earlier versions a scheme withlookleft the camera fixed.
New in 1.2.3
- Every guide address in the kit's README, both guides and both guide READMEs is the one that opens the guide (
controlsKit.package/<guide name>), checked as written in a fresh install.
New in 1.2.2
- The gallery's buttons and cards are always free to tap: while its panel is up, the live touch controls step aside for it, in play and in the editor's preview. They come back in walk mode.
- Only a card's Try it button switches scheme in the gallery.
- A full-screen panel of your own can hold the touch controls hidden while it is open.
- The guides link the engine's input guide, say plainly what happens at each step, and each carries a short README. In the example game every round can be finished in every scheme.
New in 1.2.1
- Two guides: a how-to and a step by step example game.
- Touch controls land where they are drawn at any render resolution (dynamic resolution on phones and the web).
- The engine's simulated tap reaches the kit's buttons inside the editor too.
- Leaving a world that used the kit leaves the next world free of its touch controls.
Comments · 0
Open discussion, no rating attached. Ask questions, swap notes, follow threads.
Documented parts · 10
- ControlsGallerycomponent
- controlsKitpackage
- ControlsMenucomponent
- ControlsMovercomponent
- example-game-with-touch-gamepad-keyboard-controls-platformer-twin-stick-racingguide
- gallerymodule
- galleryscene
- how-to-add-touch-gamepad-and-keyboard-controlsguide
- playgroundscene
- schemesmodule