[solved (sweat & shame)] What is « mapper » for configuring game input bindings?

Hello,

Searching how i could remap inputs for player, i was thinking first of this:
filling game.input_binding with all possible values. Then the player could chose in a menu which key he wants for an action, and in on_input i could test the stored value.

Reading the forum, i landed on this page:

It seems less overkill (avoid to send a message to on_input for each pressed key), but i have questions:

The web page above says: The all.input_bindings does this and it’s recommended to use this file , but the link it gives is dead.

Then i see it’s on Britzl github, so this method is not integrated in the Defold’s engine, isn’t it ?

What is in named directory given in the sample ? Is it part of Defold sources ? Is it usable directly from a lua script in Defold ? Should it be copied somewhere in the project path before ?

(i’m speaking of this) :

local mapper = require "in.mapper"
local triggers = require "in.triggers"

Thank you.

That file is now bundled with Defold at /builtins/input/all.input_binding.

The repository is for the defold-input library which provides the in folder once you follow the directions in the README to add it to your project:

2 Likes

Believe me if you want , but i didn’t even thought on going back at the root of the project ( https://github.com/britzl/defold-input/tree/master ).

I was 100% sure to be lost somewhere in the sources of Defold…

thank you.

2 Likes