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.

Program Announcements / Input Plugin

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 6th Aug 2008 01:57
Hullo.

Well, I know it was sarcasm when IanM said I should take my day's worth of code and make a plugin out of it, but I did anyways (Only because someone else found a feature would be useful).

Here's the readme so you can see for yourself what's in it.

READ ME.txt


Here are some of the example programs:
keyboard test.dba


mouse_test.dba


xb360 test.dba


I just made the plugin today, this morning actually. Everything appears to be working fine.

Anyways, the download is attached if you want to download it. If you don't it's not like this plugin will "save you from death" in your development. There are some advantages to this plugin though.

1. DBP doesn't natively support the XBox 360 controller. This plugin adds XBox 360 controller support.
2. DBP only supports 4 mouse buttons - this plugin supports 8.
3. DBP's MOUSEX and MOUSEY() commands only work if the mouse is inside the window, and they only return the MOUSEX/MOUSEY positions based on where the mouse is on the screen. This plugin will tell you exactly where the mouse is relative to the screen or the window.
4. From what I can tell (though I'm not entirely sure) DBP only supports 1 joystick (I call them gamepads since the ones I have aren't actually sticks). This plugin supports multiple joysticks and up to 32 buttons per joystick (If I recall correctly).
5. DBP doesn't let you set the state of any of the keys (For whatever purpose you may have in regards to this, it might be a useful feature for you). This plugin allows you to fake keyboard input.

Well, to be fair this plugin isn't necessarilly "complete." I didn't put in force-feedback for joysticks and I didn't include a "gp_isConnected" command (Though there's an xb_isConnected command and vibration support for the XB controller). I'm not able to test vibration support either on the XBox 360 controller since I don't have a real XBox 360 controller, rather a crappy one made for the PC that acts as an XBox 360 controller - but it doesn't support vibration (It does have an air conditioner built into it though, and I never liked it when game's made the controllers vibrate anyways (always annoyed the hell out of me)).

There you have it, I believe that's all that needs to be said.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.

Attachments

Login to view attachments
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 6th Aug 2008 02:08
Wow nice idea . I like how it's possible to detect how hard the analog stick is being pressed. I haven't tested it yet, but when I run into the need for more advanced input commands, I'll know where to turn

RedFlames
16
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 6th Aug 2008 11:33
Wow those fixed mouseX/Y and MousemoveX/Y commands are great but what about catching keystates while the window isnt focused? no, i dont want to make a keylogger or whatever i wouldnt do that in DBP if you want u can add a splash screen or something
and the "xb_update" got into the mouse demo by accident, right?

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 7th Aug 2008 01:49
Yeah, I was gonna do something with the xbox 360 controller in the mouse demo which was originally going to be an all around test but I removed it and decided to do individual demos and must have forgot to move it.

As for catching input while the window isn't in focus you *should* be able to do that as long as the window belongs to the DBP process but I haven't actually tested that.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 7th Aug 2008 14:09 Edited at: 9th Aug 2008 16:48
This plugin seems to be exactly what I need for a small side-project I've been planning for some days. Would it be possible to add "faked" mouseclick-commands as well? Thanks anyways, good work.
Edit: Oh well, I just figured out the this key-manipulations just seem to work within my application, right? Would it be possible to make other programs realize the "virtual key-press"?

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th Aug 2008 17:09 Edited at: 7th Aug 2008 17:10
http://challenges.dbp-site.com/challenges/mouse-gesture-recognition/diggsey

That was my entry to a challenge, and it contains code to send input to a window

btw, I won

Yuor signutare was aresed by a deslyxic mud...
Curious? CLICK HERE!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Aug 2008 03:29
@Mr Kohlenstoff
Yes -- I assume by "faded" you mean as in between 0.0 and 1.0 return values? Here's a quick way to do that outside the plugin:


I believe those functions should work - not tested.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 9th Aug 2008 16:48
Oh, well, in fact it was a typing error.. I actually meant "faked". However - I personally don't need it anymore, just in case you would spend your time on adding it otherwise.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Aug 2008 00:18
Oh okay. Yes, I can add in faked mouse clicking commands easily... Not sure why I didn't in the first place, lol.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Flaming Ghost
18
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 15th Aug 2008 15:20
Using two joysticks would be extremely helpful on a project I am working on, but I am having a little problem with this. Whenever I try to run one of the examples I get the error "This application has failed to start because XINPUT1_3.dll was not found. Re-installing the application may fix this problem." I did re-download the .dll, and I made sure that it is in my plugins-user folder. Any idea's as to what's wrong?

There are 10 types of people in this world. Those who know binary and those who don't.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Aug 2008 19:35
You need to install the latest version of DirectX.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Flaming Ghost
18
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 16th Aug 2008 22:41
Ah, thank you. That was it.

There are 10 types of people in this world. Those who know binary and those who don't.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 17th Aug 2008 01:23
Glad I could help.

Btw, the xinput1_3.dll is redistributable I believe - so if you place it in the same directory as your project you won't have to worry about the end-user having the latest DirectX version - just the version DBPro uses.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Flaming Ghost
18
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 20th Aug 2008 04:09
Well now I can get the plugin to work, but I have run into another problem. (I'm just getting started with DB again for a little simulation I'm working for my robotics team) I am running this code... and really have no idea where to go. Any pointers would be nice, I have two USB joysticks that I am trying to get to work, but this keeps spitting out the same almost zero numbers (around .0000095)



There are 10 types of people in this world. Those who know binary and those who don't.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Aug 2008 02:07
As I mentioned the gamepad commands have been untested. I'll have a look when I get home.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
The Viking
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 14th Dec 2008 01:18
Hey there... you say it can support 4 360 controllers. I have 2 but cannot figure out how to get them assigned. Is there any ways someone can help with this little issue? I've been trying for almost a month now... and still nothing... even DBP command set control device doesn't seem to work, because both controllers have the same name. Thanks
Eduardo Henrique
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: Brazil
Posted: 7th Feb 2009 23:49
Hi,
Aaron Miller
Your plugin is all that I need to complete a project ! Im doing a simulator for machines like excavators, and I need 2 joysticks.
But they dont work for me... I ever read the number 0.99999985 for all axis...
Please check whats happens...
Thanks,
Edu.

Login to post a reply

Server time is: 2024-03-28 19:24:10
Your offset time is: 2024-03-28 19:24:10