ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.33k stars 254 forks source link

Supporing Typematic rates #133

Closed konijn closed 6 years ago

konijn commented 6 years ago

Greetings!

In the days of PS/2 keyboards, pressed keys would by default repeat faster after holding them down 0.5 seconds, they would trigger 11 events per seconds until the key up. More info: http://www.tekweb.dk/manuals/command/commands/M/MODEST.HTM

Is it possible to emulate this in ROT.js ? (Keeping track of 'down'/'pressed' events for a key without a matching 'up'? This would make crossing larger screens so much more bearable.

If you were interested, but lack time, let me know and I might try and take a stab at it.

kosinaz commented 6 years ago

Check out https://github.com/kosinaz/Dungeons-of-Neverknown I think this is what you are looking for. This movement implementation is not based on rot.js though.

konijn commented 6 years ago

That, and for other users looking here, just setting mode con rate=31 in the console fixes my problem as well. Also, when I run Dungeons of Neverknown in Chrome, them neither arrow keys or WASD works. Either way, I will close this issue.