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.

Dark GDK / Missing commands in DGDK for Input...

Author
Message
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 10th Apr 2010 10:35 Edited at: 10th Apr 2010 10:44
dbSetControlDeviceIndex(int iIndex)
int iIndex = dbControlDeviceIndex()
dbSetControlDevice(char* pName , int iIndex) <--- (The overload for specifying different controllers with same name)
dbSetJoystickDeadzone(int iPercentage)
int = dbJoystickInformation(int)


Ummmm, yeah. I was trying to use one of the input examples that came from the DBPro help docs. The program ran GREAT in DBP and actually showed me usable input from my PS3 controller. However, since the program I am going to be making is simply not viable through DBP, I opted to go with DGDK, so the next step was to convert the example program to DGDK code and get it running.... came to find out that the above commands are missing from DGDK.

Is there anything I can do about this? I understand that setting the joystick deadzone is something I could easily do via my own code, but I'm not sure what to do about the others.


The one and only,


entomophobiac
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 10th Apr 2010 12:27 Edited at: 10th Apr 2010 12:30
I'd suggest that you look for the PS3 driver library and wrap your own functionality around the controller. There's an old archive from 2006, utilizing the SixAxis controller, that you can find and download.

http://www.mediafire.com/?xjbumypmc1z

And this might come in handy, too:
http://www.codeproject.com/KB/mcpp/wiredps3axis.aspx
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Apr 2010 13:19
Just add the declarations in the header file 'DarkSDKInput.h':



I see dbSetControlDevice already defined. However ControlDeviceName was missing last time I tried (I think I wasn't using the right name).

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Apr 2010 00:39 Edited at: 11th Apr 2010 00:41
@Morcilla:

I attempted to do that, actually. It caused a linker error stating something was wrong with the stuff I put into the header file. Most likely didn't name the variables correctly or whatever.


@entomophobiac:

I'm not worried aboutt he PS3 controller right now. It acts as it should and I can actively set options for it. I have it working with analog triggers, as well as sizaxis support (both detected through the DBP commands, which is awesome )
Right now, I just want this example program tow ork in DGDK.
Thank you for the links, though, and trying to help me out.


The one and only,


Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 11th Apr 2010 05:00 Edited at: 11th Apr 2010 05:01
i wouldnt recommend gdk integrated input library for joysticks, i have heard that for various joysticks it is slow, search for a directinput wrapper. i have one but i havent implemented force feedback and will release some time later when its complete

hi
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 11th Apr 2010 05:34
It just so happens that I do have a DX joystick wrapper w/feed-back support, however, it's been written YEARS ago (almost 10-years ago to be exact), but as DX-Input hasn't changed much in that respect, I'd be happy to share it with you all...

I wasn't sure if GDK uses WIN-messages or DX for input, so I've not really looked into it too deeply lately, so I've been concentrating on learning the 3D aspect of things (not too quickly I might add - this 3D stuff is very hard for me to comprehend)...

If you want it, just say so, I can post in a virtual heart-beat...


NOTE: Complexity of the C++ classes is simple, but not very simple for the proverbial newbie... (not very complicated really - but uses inheritance extensively)


Regards,


JTK
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Apr 2010 08:48
Thank you for the suggestions.

JTK, if you want to release it, I'm sure there will be people who would find it useful! What I'm doing doesn't require a joystick, but it would be nice.

What I wanted the joystick for was just to have a way to interact with what I'm making. It's not a game, just a tech demo, so speed isn't really of the essence.

I made a small AI demo, where the AI controls ships that can actively move in any direction at any time and can fire in any direction at any time. Obviously, the keyboard and mouse wouldn't allow me to "play" in this setup, but since I have a PS3 controller and it has 2 analog sticks, that would do nicely for moving AND firing in any direction on the fly. It's not pertinent for me to play with them, as they do just fine engaging each other, but it's something I considered and wanted to try out. DBP's joystick/control device commands would have sufficed, but without the commands it is missing, I'm not sure how to go about making it work.


The one and only,


Login to post a reply

Server time is: 2024-10-02 03:41:18
Your offset time is: 2024-10-02 03:41:18