Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Joystick Input #1062

Open
sstallion opened this issue Feb 16, 2021 · 4 comments
Open

Joystick Input #1062

sstallion opened this issue Feb 16, 2021 · 4 comments

Comments

@sstallion
Copy link

Is your feature request related to a problem? Please describe.
One of the best features introduced in Diablo III (and beyond) was support for joystick controllers. I was curious if OpenDiablo would be open to such a feature?

Describe the solution you'd like
A couple years ago, I developed a cross-platform HIDAPI support package for Go to tackle a private project, but I've been wondering if it could be suitable for adding joystick support to OpenDiablo2: https://github.com/sstallion/go-hid

Describe alternatives you've considered
I suppose I could stock up on PS2 IntelliMouse's and relive 2000 again :-)

Additional context
I've been looking for an excuse to dip my toe in OpenDiablo2 development, I thought this might be a good task to get started.

@gravestench
Copy link
Contributor

gravestench commented Feb 16, 2021

it's definitely possible, and we've made it flexible enough that even MIDI can be used as an input backend.

Here's an example of using midi (via puredata) for controlling the mouse.
https://user-images.githubusercontent.com/936440/108117887-663f8480-7052-11eb-8421-de3c5a88e147.mp4

EDIT: iirc, this midi stuff was never merged because it added a c library dependency for libportmidi. But i think you get my point: adding joystick support is very much a possibility.

Also, we're currently using ebiten, and will likely start using SDL2 shortly, so I believe we already have the ability to read joysticks and gamepads, we just haven't written the code for handling it. :)

@sstallion
Copy link
Author

sstallion commented Feb 16, 2021 via email

@sstallion
Copy link
Author

Also, we're currently using ebiten, and will likely start using SDL2 shortly, so I believe we already have the ability to read joysticks and gamepads, we just haven't written the code for handling it. :)

Makes sense - at the very least that should reduce the amount of work by quite a bit. I'll check back once SDL is integrated. Thanks!

@evbo
Copy link
Contributor

evbo commented Mar 14, 2021

As a long time controller/joystick user with the original D2 (with the right mods), I just want to add that the limiting factor is with quality of life (QoL):

  • (shift) clicking potions to your belt is too difficult with a controller (thumb stick), especially when taking heavy damage when you need split-second reaction time. Instead, there needs to be a shortcut for drinking potions direct from the inventory (even with it closed) like was made possible by SlashDiablo's "BH" hack for the original D2.
  • loot filters and auto gold pickup are necessary with a controller to keep gameplay fast paced.

Without the above, playing with a controller is akin to tying your shoes with chopsticks. But with those enhancements, so long as you use area of effect (or splash) attacks, the game is actually quite playable! And hey, you can even play it on a treadmill!

@sstallion I use this currently for D2 (here's the linux version): https://github.com/AntiMicroX/antimicrox

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants