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.

Work in Progress / DarkInput - DBP plugin

Author
Message
Plystire
16
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Jun 2012 06:57 Edited at: 18th Jun 2012 07:49
Dark Input


Description: A plugin for DBPro designed to make access of HIDs (Human Interface Devices) a snap!


Calling all testers!
I need testers for the following input devices: Joysticks/Gamepads and WebCam.
When further devices have support implemented, I will need testers for them as well.



Current Lineup:
(=Idea ; =WIP ; =Done ; =Dropped)

- Joystick support (Up to 10 simultaneously, need testers for this)
- Microphone support
- - Voice Recognition (Maybe even synthesis?)
- WebCam support (need testers)
- Multi-touch support


Current Commandlist: (Subject to change)
DI Init Joysticks - Compiles list of available joysticks, enumerates them, and prepares them for use.
DI Update Joysticks - Retrieve latest joystick state (Called before checking buttons/analogs/etc)
DI Get Joy Count - Returns the total number of joysticks that have been initialized by DI Init Joysticks
DI Get Joy Name(JoystickID) - Returns the "friendly name" of a joystick
DI Get Joy X Axis(JoystickID) - Axial information from joystick
DI Get Joy Y Axis(JoystickID)
DI Get Joy Z Axis(JoystickID)
DI Get Joy X Rot(JoystickID) - Rotation information from joystick
DI Get Joy Y Rot(JoystickID)
DI Get Joy Z Rot(JoystickID)
DI Get Joy Slider(JoystickID, SliderID (1-2)) - Additional analog information from joystick. (Since there can be 2, the slider index must be supplied)
DI Get Joy POVHat(JoystickID, HatID (1-4)) - POV Hat information from joystick. (Since there can be 4, the hat index must be supplied)
DI Get Joy Button(JoystickID, ButtonID (1-128)) - Button information from joystick.

DI Init WebCam - Initializes the webcam for use (Default webcam setup in system)
DI WebCam Connected() - Returns state of WebCam connectivity. 0=Not Connected, 1=Connected, -1=Failed to Connect
DI Capture WebCam to Image <ImageID> - Takes a snapshot from the webcam and stores it into the specified image.
DI Capture WebCam to Memblock <MemblockID> - Takes a snapshot from the webcam and stores it into the specified memblock.



Additional Information:
I am open to C&C, thoughts, opinions, etc.



Thank you for your time!


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Jun 2012 09:10
Quote: "
Joystick support (Up to 10 simultaneously, need testers for this)
"


max 4 I think is enough... but yeah go for it but be sure to support the XBOX 360 joypad for Windows by default...

Quote: " - Microphone support"


isn't this already in place?

Quote: "- - Voice Recognition (Maybe even synthesis?)
"


personally... I think ENDWAR was a good example of why this is funky and a complete failure...

Quote: " - WebCam support"


potentially interesting for that old school trick to put the users face in the game but I think this novelty has expired... but video capture and encode... yeah why not! ensure compatibility with VC-1 and it should do good



the above aside... I hope you get somewhere with this as I think DBP has a lot to give for some time to come!

how about graphics tablet input support for swipes... and pinch gestures etc...

that would be very useful for touch screen users but I have a bamboo fun pen and touch tablet and it would be awesome to manipulate my 3D scenes with it

Plystire
16
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Jun 2012 22:57
Thank you for the input, MrValentine.

Quote: "be sure to support the XBOX 360 joypad for Windows by default"


According to my tester, it works great with an XBox controller!

I put in support for up to 10 controllers, mainly for people that have tons of joysticks/pads plugged in, but may not use them all. Since the mod can parse out a joypad's name, the player can set up which joypad to use for controlling.

Quote: "how about graphics tablet input support for swipes... and pinch gestures etc..."


I will definitely look into supporting those! Thanks again!


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
BlackFox
FPSC Master
11
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Jun 2012 02:13 Edited at: 12th Jun 2012 02:14
When it comes to the gamepads, will the plugin support the "modes" that some pads have? For example, we have a Logitech gamepad- one mode classifies it as "Logitech Dual Action USB"; the other mode classifies it as "Gamepad (F310). The difference is the dual action allows me to have more buttons to assign than the other.

Had also been thinking about items like Palm/Pocket PC. I was not sure if these devices would fit your plugin/direction or not.


Twitter: @NFoxMedia
Plystire
16
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 12th Jun 2012 05:36 Edited at: 15th Jun 2012 23:49
I suppose it depends how the driver handles the mode swapping. If it set up all the buttons ahead of time and the mode change only alters how the device is read, not causing the device to "unplug" and "plug in" again, then it should work fine.

But if changing modes causes the controller to unplug and then plug back in (new driver), it may require some custom coding to handle. I think, you can run the Init Joysticks command again to find new controllers, which should take care of that.


As for the Palm/Pocket PC device, what kind of input do they have?


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Plystire
16
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Jun 2012 00:09 Edited at: 16th Jun 2012 00:11
Looking for testers now!

Joypads:
Need to test amongst many different joypads. Hoping to find special-case scenarios.
If anyone has multiple joypads they can test with, I would really like to see how many the plugin can support simultaneously.

WebCam:
Work on webcam support has also begun. I would like to have testers for this as well.


DBP source code will be supplied to get testers started.
If you would like to test, but don't have DBP, I can also supply sample programs.


If you would like to test, please email me, listing what you are capable of testing, so that I can send you the DLL/code/apps.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Plystire
16
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Jun 2012 08:07
Progress Update

WebCam commands added and tested on a couple systems.

Attached is a pic of my WebCam test program. WebCam is rendering in realtime to an image being used as a texture for a cube.

So far have had a couple fails when using built-in laptop/netbook webcams (but also a couple successful laptop webcams). If anyone with a webcam would like to help me test this that'd be super helpful!


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.

Attachments

Login to view attachments
PeteyM5
10
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 23rd Jun 2012 00:52
The project I have started up ran into an issue with identifying joysticks at startup. If no USB (or MIDI port) joystick was plugged in when the program was started, no joystick will be there. The user will need to exit the program, plug in the joystick, and restart. Maybe this plug-in can help work around that issue and identify the joysticks immediately or be able poll the joysticks with a in-program button.
Plystire
16
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jun 2012 12:26
If "DI Init Joysticks" is called again, it will re-poll joysticks plugged into the system, so yes that is very possible.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.

Login to post a reply

Server time is: 2019-05-25 23:02:45
Your offset time is: 2019-05-25 23:02:45