Comments (7)
X, Z + Arrows is selected as generics layout (all emulators use this binding).
Just because "everyone is doing the same" doesn't mean it's the best way.
In fact, I complained a few times in the TIC-80 discord about this.
in addition to Y to Z for German keyboards
That's pretty much why I mentioned this in the small text under my game. Maybe this should be mentioned below the playable games. Currently it only states "Arrow keys" and "Z/X".
Something like
Arrows keys = D-Pad
X = Button 1
Z/C/Y = Button 2
might make it more obvious.
from wasm4.
I did not realize that C was bound too automatically π. This already solves half of the issue.
I also checked some more keyboard layouts (PT, ES, CN, Arabic, etc.) and most seem to have Z in the "right" place next to X, it is only DE, FR, and some others that have them "misplaced". By having C/Y/Z bound to Button 2, you already cover most of the planet I guess.
Then the issue is more in the hint below the demo games on the website as @christopher-kleine said.
I still think, Watris should get the D-Pad down bound to "drop" as it the original GB game had it.
Then the Buttons 1 and 2 could be used left/right rotation (I also think the GB game had it like that).
I will check the code and try do PRs for Watris and the website (after getting the project to run on my machine).
from wasm4.
Accessibility is not a main option.
X, Z + Arrows is selected as generics layout (all emulators use this binding).
If you want change this, you should provide a PR for site, docs and runtime , because not all has a FR layout and non-EU keyboard.
I can said more - generic layout is EU :)
And you CANNOT change layout a game specific, because it limited specially.
Looks to docs about this:
https://wasm4.org/docs/guides/user-input#gamepad
If a devs select a ArrowDown as input - him think that this is good.
from wasm4.
Hi @ubunatic,
This is more an a11y issue of the console:
cartridge developers do not have access to raw keyboard keypresses and current layout, as @eXponenta said, it is rather common.
Generally emulators resolve the issue you raised using a window that allow to customize keys.
We should probably add a similar feature and persist the custom key mapping.
from wasm4.
Add C as more universal "hard drop" key (Z is always a bad choice as an action button, e.g., for DE and FR layouts, where it is not next to X).
This should actually already be the case, we alias C to Z, in addition to Y to Z for German keyboards. We even include Dvorak-friendly mappings for Z/X. This is not at all obvious though, so let's add some documentation about it.
Here is where the Z/X keys are handled:
wasm4/runtimes/web/src/index.js
Line 220 in 97e7d0b
If there are missing Z/X aliases for other keyboard types, let's add them. In the future having customizable keybinding as @FaberVitale suggests will also be fantastic.
from wasm4.
PR #87 for improved Watris keys is open.
PR #88 for hint to alternative keys is also open.
Btw. the "60 second" dev setup was super smooth, npm install wasm4
(without the -g
)
And then a simple make && ~/node_modules/wasm4/cli.js run build/cart.wasm
to test it. π
from wasm4.
Btw. the "60 second" dev setup was super smooth
Good to know π
from wasm4.
Related Issues (20)
- The online multiplayer system has stalls and halts
- Expose A Portable Web Runtime? HOT 1
- Zig v0.11 breaks w4's build file
- Run-native under Linux: lots of buttons donβt work, and some undocumented ones do HOT 1
- Document embedding carts using a wasm4.org iframe
- Suggestion: display runtime version number on menu HOT 1
- WASM globals are not managed by the netplay synchronization engine HOT 1
- Move games elsewhere
- [Web build] Mouse can be detected outside the screen HOT 3
- Use Go 1.21 WASI GOOS in examples HOT 2
- Start function is not called when DEV_NETPLAY flag is set.
- update zig template HOT 5
- wasm4 project runs on native mode, but doesnt run on browser HOT 1
- Inconsistent Audio Output HOT 2
- WasmGC support? HOT 1
- Correct FPS not being passed to devtools
- Zig template doesn't build HOT 3
- Make `w4 watch` less resource-hungry
- Cut new release? HOT 1
- shadow dom?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasm4.