Integrating Controller Input #35
Replies: 2 comments
-
Interesting idea! For such a feature, what I'm picturing is a unique 'mode', which I'll refer to as the 'controlled mode'. This mode would be automatically activated when a player intentionally navigates their character into a visually highlighted 1x1 zone, produced by the tag. Exiting this mode could be as simple as an ESC input. The tag would then enable MML developers to register handlers for device input events. These events would only be considered when the player is within the 'controlled mode' For instance, if an MML object registers a keydown event for 'W', the default behavior of moving forward could be bypassed. Instead, the developer could choose to propel an entire vehicle, including the player, forward. This would surely lead to the creation of a wide array of vehicles, but it also opens up the possibility of designing entirely new games, use-cases, and experiences within M2 worlds |
Beta Was this translation helpful? Give feedback.
-
This is now tracked by #63 |
Beta Was this translation helpful? Give feedback.
-
What is your idea?
The introduction of a feature which allows JavaScript in the MML document to capture inputs from a variety of controllers including gamepads, keyboards, and other peripheral devices.
Why is it important?
By incorporating this feature, we can greatly increase the range of interactions with game elements present within the MML documents. This could include interactive experiences like drivable cars, remote-controlled toys, and any gameplay element that requires direct user input.
What do you propose?
The proposal is to implement
<m-input>
, a mechanism in JavaScript that can accept and process inputs from different controllers. The focus of this feature should be user-controlled, enabling and disabling when desired, and clearly visualized when in focus. Conceptually, this is similar to focusing on an input element in traditional HTML, but expands the concept to include a variety of controller inputs.Beta Was this translation helpful? Give feedback.
All reactions