Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Xbox Controller Tester (with Rumble)

Author
Message
Yarbles2018
7
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 26th Feb 2024 20:44 Edited at: 26th Feb 2024 23:31
Hi all,
It's been a very long time since I posted some code....
So I've dusted off some old projects and am working on a new one as well. I decided to add Xbox controller support, just for fun!

In order to test my Controller, I built this tool, and it works in both DBPro and DBClassic:
Please download the attachment and Unrar to a folder somewhere, it contains source, media and executables.
Needless to say, you'll need an Xbox controller connected via usb port to test it.

If rumble is not working for you, there is a folder packed in with some drivers (/force_feedback), see the readme there.
Those drivers should help allow DarkBasic to see your Xbox controller as a Force-Feedback joystick.


Here is the source code:


Enjoy!

Attachments

Login to view attachments
Yarbles2018
7
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 3rd Mar 2024 09:40 Edited at: 12th Feb 2025 02:13
I thought I should post a screenshot of the tool as well:

Attachments

Login to view attachments
Yarbles2018
7
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 3rd Feb 2025 03:21
Bumping this
James H
18
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 3rd Feb 2025 10:01 Edited at: 3rd Feb 2025 10:25
This works great! I am using windows 10 x64 and it works spot on for both DBC(1.12) and DBP(1.0761). Thanks

Edit:
I knew the inputs worked in AppGameKit for this controller as there is sample code, but it lacks force feedback commands for the rumble. Perhaps you might consider supporting AppGameKit in the same manner(though you would have to add the commands - source is on GitHub). If you don't have it then it would set you back just over £30 right now as its 60% off - this is just an FYI, no pressure, I have not seen any requests on the forum for it, plus £30 not spent is £30 in your pocket! It would be pretty cool though
Win 10 Home 64, Intel(R) Core(TM) i5-10300H, 8GB DDR4, NVidia GeForce GTX 1650 4GB GDDR6
Yarbles2018
7
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 4th Feb 2025 12:40
@James H .. if you're interested in seeing how it works in a game setting...
I released the game that I was developing this for as open source!

See this thread: https://forum.thegamecreators.com/thread/229809
Yarbles2018
7
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 10th Feb 2025 03:01
Since forum attachments won't work anymore, here is a link to the media files shared on my Google Drive:
https://drive.google.com/file/d/18cSf11h-g3pIRiezRJEKfT2V-HuQ7SsA/

Login to post a reply

Server time is: 2025-05-17 06:10:51
Your offset time is: 2025-05-17 06:10:51