00-Evan / shattered-pixel-dungeon

Shattered Pixel Dungeon is an open-source traditional roguelike dungeon crawler with randomized levels and enemies, and hundreds of items to collect and use. It's based on the source code of Pixel Dungeon, by Watabou.
https://shatteredpixel.com/shatteredpd/
GNU General Public License v3.0
4.59k stars 1.07k forks source link

Full keyboard support #351

Open bagnacauda opened 4 years ago

bagnacauda commented 4 years ago

The keyboard support is good, but from time to time it happens to be forced to use the mouse. For example in two options popups you cannot choose an answer, you can only close the box. Also it would be very nice to select items in the inventary using arrows.

00-Evan commented 4 years ago

This is the sort of thing I will be able to do more properly with the unified codebase. I'm likely going to backport existing desktop features to this repo in the next update or two, and after that point I will look at expanding them.

Sanphobia commented 2 years ago

It'd be cool to use Terraria's smart cursor feature for aiming in a general direction. Like using WASD for moving and arrow keys for aiming, or pressing a key (eg. "F") to toggle WASD to aim.

other than that, if the game could detect trackpoint nubs on keyboards then use it like an analog stick, that would be awesome.

00-Evan commented 2 years ago

An update on this, I'm making several keyboard improvement in v1.2.0, but full keyboard support for menus is not yet implemented. I do plan to add that in a future update sooner than later.

pupitetris commented 2 years ago

Hi. I have implemented a suggestion for a keyboard / gamepad selection mechanism, using a cursor. Check it out at https://github.com/pupitetris/shattered-pixel-dungeon/tree/keyboard-selector I planned to send a Pull Request, but just then realized that 00-Evan does not accept pull requests! @00-Evan are you accepting contributions? It was entertaining to implement this feature and all, but it would be a shame to see it go to waste.

00-Evan commented 2 years ago

@pupitetris I'm afraid I don't accept contributions, both because i want Shattered to remain a solo project for its core development, and due to copyright concerns.

It's worth noting that the game does already have a custom cursor for controller users. It didn't work too well when used with keyboard though, as the user can't control the speed. For now the game requires either a controller or keyboard and mouse.

pupitetris commented 2 years ago

OK, thanks. Check the feature, though. It is inspired on Nethack's interface.

Regarding copyright, open source foundations have dealt with this topic for years, so that they can defend the software's liberties even when the original authors of the code are not available in the future. The idea is for the central entity to hold control over the copyright of the contributions. Here an explanatory text: https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/Copyright/conditions.text

And an example of a Copyright Assignment document: https://www.dreamsongs.com/IHE/IHE-110.html

Of course, you still have to make contributors send you their assignments, probably through snail mail, but you can put pull requests on hold until they arrive. I'll leave the topic there: the issue has a solution, but of course it's a beureaucratic / legal thing that has to be done and it takes some time and effort. My point is that it is not impossible, specially for a small project like this one, where you won't get a huge volume of contributions.

Greetings, and thanks for SPD!

00-Evan commented 2 years ago

Unfortunately my concern isn't with the actual legal precedent, my concern is how platform holders (Apple, Valve, etc) would respond to a "this game uses my code without permission and I want it taken down!" message. I feel the best way to be safe there, especially given that it's a solo project anyway, is to not accept contributions.

npetronio1 commented 1 year ago

Hello @bagnacauda, I would like to work on this issue. Could you please assign it to me?

00-Evan commented 1 year ago

Hello @bagnacauda, I would like to work on this issue. Could you please assign it to me?

Only I have the ability to assign issues. I am afraid that while Shattered is open source, I do not accept code contributions. You are welcome to make your own version based on Shattered Pixel DUngeon and implement things you want into that though.

TadaCZE commented 1 year ago

You mentioned that you plan to implement full keyboard support soon, and I think not a lot of things remain to be implemented. As of now, only inventory management and menu navigation is still inaccessible (and that is basically the same thing as an inventory is just a menu that looks different), so I have some suggestions.

If you decided to implement keyboard only functionality, a lot of keys could be reused:

I think this issue is larger then you might think, because it affects multiple groups. First of all, some users with motor disabilities use only a keyboard or even an assistance software emulating a keyboard and not a mouse or a trackpad, so this would make it more accessible to them. Other people, even healthy ones, typically Linux users or minimalists prefer to use just a keyboard, making use of a lot of shortcuts and things like tiling window managers, the terminal and text editors like vim to do their evil bidding.

Now the typical gamer does not include either of these groups, but any person simply gaming on a couch would be well-served by this, as using a mouse on a couch is much less comfortable than using it on a desk unlike a keyboard which is typically able to be supported with legs. This also applies to sitting on a bus with a laptop and a countless number of other situation where the setup is cramped.

I am mainly writing this to bring this issue back to your attention.