-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Is Controller Support Possible? #536
Comments
Yeah, it has been on my Todo list for a long time.. I hope to get around to it eventually ;) |
Thank you. :) |
really would be an amazing edition allowing me to get rid of BFG one and for all. |
I'm curious: could rumble support be implemented too if this gets controller support one day? |
I'm currently working on gamepad support in this branch: https://github.com/dhewm/dhewm3/tree/controller-input It already mostly works, but still has some issues, esp. in multiplayer. I don't have any plans to work on rumble support, and I'm not sure how to implement it anyway (where/how to get the information when to rumble), but if someone figures it out: patches/pull requests are welcome ;) |
I hope this gets merged soon. We don't need rumble. Not having my fingers cramp on kb&m is a godsend thank you for your work x3 |
I think it's pretty much ready. I'll upload Windows-Binaries for testing later, if you build yourself anyway you can use the current state of the aforementioned branch. |
Here's a build for Windows: dhewm3-1.5.3pre-gamepad.zip |
Just tested on my PS3 controller. I loved how the game displayed the proper name of the buttons like Cross, Triangle, etc. Stick navigation in the menus was smooth and easy. Unless you need to polish the controller code more, I'd say that it is ready to ship. |
Great, thanks a lot for testing!
Yeah, today I found out that SDL2 (from 2.0.12 on) supports detecting the kind of gamepad, so implementing this was easy enough. I guess I'll merge it in a few days, I hope I'll get some more feedback in the meantime :) |
Note: I did some small improvements for the displayed button names, especially with Nintendo-like controllers, which aren't in the windows build linked above. Please test the build anyway, as this is a pretty cosmetic change. |
This is great. I've played around with it for a couple of hours and all seems to work as expected. Movement is smooth with no noticeable lag even with a Bluetooth controller. All buttons were recognised on my DS4 and 360 controllers. All in all, pretty great at this end. :) |
As you have a DS4 controller: What button is detected as "Pad Back"? The "Share" button, I guess? |
Yeah, the "Share" button is detected (and named) "PAD_Back" when setting the button to an action in the bindings menu. Just a thought, muscle memory causes me to hit 'fire' (in my case Right Shoulder) to confirm things in-menu but the game only recognises the "A" button. Dunno if I'm just being weird or not. Just thought perhaps whatever button is assigned to "fire" could also be used as a confirm button just like when in-game. Hope that makes sense. I have a habit of typing a lot of words and not really conveying what I mean! Regardless, I'm super thankful that I can finally play Doom 3 with proper controller support. :) |
Thanks! Isn't fire usually right trigger? Not sure if I can make it use whatever button is bound to fire, the menu is pretty independent of the key binding system. I could make right trigger behave like Pad A (or left mouse button) though. Also note that ingame GUIs, including the PDA, do you the fire button (whichever it is) for clicking, just the main menu and similar don't. |
No worries. Yeah, it's usually the right trigger, I just prefer the click of the shoulder buttons. Regarding the PDA, yeah, that's the reason why my muscle memory goes for the 'fire' button. Like I say, it was just a thought. I don't think it would be a big deal for anyone else. I'm just a bit of a weirdo! :P |
nevermind, turns out using the attack button is easy enough! |
Oh cool beans. Thanks for your kindness. :) |
Updated build for Windows: dhewm3-1.5.3pre-gamepad2.zip |
Controller is awesome. Thank you for this. Messed with the seta joy_ commands a bit to get a good acceleration for turning, and it's great. |
I created gamepad configs for the base game and d3xp (Resurrection of Evil), based on the standard bindings of Doom3 BFG: gamepad_cfgs.zip The control scheme is like this (assuming an XBox-style gamepad):
Buttons "B" and "Y" are unused - in D3BFG, Y was "use", but no such action exists in Vanilla Doom3, and "B" seemed to be entirely unused in D3BFG (except in menus), for whatever reason. But you can of course bind them yourself to whatever you like ;) |
what was the Xbox layout? not the BFG but Original Xbox Port. Also loving this everything works great. |
from the original manual (https://archive.org/details/xboxmanual_Doom_3_Collectors_Edition/page/n3/mode/2up) not overly useful for modern gamepads, IMO |
I have the Hyperkin Duke so i wanted to replicate it. I think the only thing left to do is document the values for gamepads so we can tune the acceleration like in the above post. |
I'm trying to test this with a DualShock 4, but so far I can't move the camera with the right stick. How can I restart the setup so I can see if my config is breaking things or this mod? Also, on a bit of a different subject, are you planning on adding assets to the game to include button icons or localized texts for the button names? |
For the right stick to work, you need to bind Turn Left, Turn Right and Look Up and Look Down accordingly
No |
I tried the controller support test build that was shared and so far it has worked pretty good with an official Xbox Series Controller and I tried hotplugging from swapping that controller out for the 8BitDo (in XInput mode) and it works pretty flawlessly with that one, I might have to do some more testing with other controllers I have access to. I do have some issues with navigation in the PDA screen. The simulated mouse controls work fine but I feel it's kinda slow in the PDA screen, even when tilting the stick all the way, and there's also the issue of having to use the simulated mouse to move a scroll bar down for long e-mail messages. I don't know if it can be implemented, but is there a way to have a joy CVAR command for scrolling up/down? Apart from the lack of rumble support, it is working out nice from what I experienced using the original Xbox controls; I might mess around and try to recreate the BFG Edition/Doom 3 (2019) controllers with this build of dhewm 3. |
Sorry, but the way the PDA is implemented just sucks, so it's very hard to improve. That's why the mousewheel doesn't work in the PDA either, even though it works in regular menus.. |
Added some documentation: https://github.com/dhewm/dhewm3/blob/controller-input/Configuration.md#using-gamepads |
I think it reads alright, but you should also add the mappings in simple text format (just copypaste this part: #536 (comment) ) for people like me, who thought could just copypaste the files and run the EXE without running the command, thinking the game would get those cfg files automatically. You know, making it a bit more dumb-proof. |
Merged gamepad support into the main branch and added the default mappings configuration as suggested: As this is merged, I'll close this issue, but if you have further remarks feel free to add them here; however if you find actual bugs (or something that is so annoying that I should change it) please create a new issue for that. |
I happen to have the original Xbox port of Doom 3 and playing it through backwards compatibility on Xbox 360, I found in the Options menu under the Buttons configuration, the ALTERNATIVE button layout on an Xbox 360 controller translates pretty well on newer modern controllers since the Xbox's White and Black buttons are moved to LB and RB (or similar) respectively, and in my opinion works better for original Doom 3 than the BFG Edition-styled layout since the Sprint button is consistent with the other classic Doom games and the flashlight mechanics of original Doom 3 works in its favor. For reference, I took photos of the button and stick configurations of the game that can be found in this album (sorry for the poor picture quality, I don't have a camera on me that's up with the times). I can also confirm that the Xbox port of Doom 3 (and presumably RoE as well) also lets you assign any weapon as a shortcut on the D-Pad whereas the BFG Edition does not on consoles (tested from the 2019 re-release of Doom 3 on the original Xbox One model). I put together some pre-made gamepad config files. These include a modern-styled layout that is based on a modified version of the Alternative configuration, a slightly tweaked BFG Edition configuration, and the original Xbox version's Default and Alternative configuration for those who want to try them out a Hyperkin Xbox Duke Controller. EDIT: See the next posts below for an updated set of configs. |
which one is the "Alternative" layout on the screenshots? "Expert"? "Legacy"? |
I just released 1.5.3 RC1 - testing is welcome! :) |
I've updated and fix the configurations I put together for dhewm3, apologizes for the inconvenience when using them with Resurrection of Evil/The Lost Mission expansions with some misplaced buttons. |
Cool, thanks, I'll add a link to the documentation! |
https://github.com/dhewm/dhewm3/blob/master/Configuration.md#using-gamepads now has a link to your comment with the alternative configs, thanks again! :) |
Thank you as well! |
Minor issue, but on a V1 DualShock 4, the touchpad button doesn't seem to work nor mappable to anything I tried. Haven't tested on a V2 controller yet. |
Not sure the touchpad is recognized on any controller. |
Anyone having problems where out of nowhere the bottom face button stops working as a gamepad button and suddenly acts like Left Mouse Button? I had this happen at least 3 times already with RC1 of 1.5.3, and I tried forcibly unbinding the button face button (which in my case happens to be the A button on an Xbox controller) which didn't solve the problem. I've been experiencing this problem from a 64-bit build I compiled with the most recent commits of dhewm3. I also had the Enhanced Edition mod and HD Essentials Pack installed when this happened but I also encountered this problem without any mods installed. I have the recent log files from my play session if that might help isolate the cause of the issue. UPDATE: I think I found the cause of the issue, it seems to happen when interacting with clickable panels with the game while using a controller. It also sadly affects the Y button (or equivalent ). It even happens with mouse on clickable panels and trying to use the controller afterwards. UPDATE 2: I can get this problem somewhat consistently in base Doom 3 early into Delta Labs 1 and always consistently in The Lost Mission campaign port in the elevator before the Trite ambush in Underground Site 1.
There are some games I have tried, even without SDL2 support used for some of them, that may have worked with Touchpad button but I could be misremembering. |
Argh, I knew this code was gonna bite me in the ass :-/ Lines 1012 to 1027 in 0d4405b
I think I can reproduce the issue, and it seems to happen when switching from one ingame panel to another so quick that the first one doesn't get "deactivated" when activating the second, so when leaving the second only that one gets deactivated and my ugly hack thinks that one ingame GUI is still active.. And the problem is, it can happen that two ingame GUIs are active at the same time (or rather, that one needs to "remember" the old one when a new one becomes active), because the PDA is implemented in such an ugly way that it looks to my detection logic like just another ingame GUI (like a panel). So when a normal panel is active and the PDA is opened, the panels UI must remain in my list, so after closing the PDA the gamepad still works with it (as it only becomes inactive when moving the cursor away from it). Not sure yet how to fix this, but at least I can reproduce the problem.. so thanks for reporting :) |
I think I fixed the bug, can you try the new build: dhewm3-1.5.3_RC2_win32.zip Note that it only properly fixes the bug in the base game and Resurrection of Evil, for the mods I'll have to adjust their DLLs as well (I'll do that before the proper 1.5.3 release). I hope I get around to properly release 1.5.3 RC2 soon, but for now here's a Windows build, based on the code currently in the git master branch.. |
Now there's also updated mod DLLs: https://github.com/dhewm/dhewm3/releases/tag/1.5.3_RC2 testing is very welcome! |
I tried Lost Mission with the RC2 release of v1.5.3 at the same spot I was having the problems I reported earlier and it still happens sadly. Even compiled 64-bit builds I compiled via source code reproduces the issue. I haven't tried base Doom 3 or Resurrection of Evil yet though. |
I'll take a look at D3LE, thanks! (I reproduced the issue in Delta Labs 1 and I think I fixed what caused it there, I assumed that it would be the same problem in D3LE so I didn't test that :-/) |
I opened an extra issue for this: #566 |
(in #566 you can also find an updated build that fixes this issue) |
I can't play with mouse and keyboard for more than a few minutes these days. I can only properly play games with a controller. I would love to play Dhewm3 but I have to use Doom 3 BFG.
I would consider this an accessibility issue. :)
The text was updated successfully, but these errors were encountered: