Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectInput slow!

Started by Whelzorn Mar 3, 2004 at 6:05 PM 3 replies 950+ views
Original Post
Whelzorn
Whelzorn
I''m using DirectInput for a 3d DX8 app, and it is rather slow... when I tell the char to move right (right arrow), it takes about .6 seconds for it to react... this makes turning hard, and its a pain to move. Any ideas?
01001001001000000111010001101000011010010110111001101011001000000111100101101111011101010010000001110111011010010110110001101100001000000110011001101001011011100110010000101100001000000111010001101000011000010111010000100000011110010110111101110101001000000110000101110010011001010010000001101101011001010111001001100101011011000111100100100000011010010110111001110011011010010110010001100101001000000110000100100000011010100110010101101100011011000111100100101110
ArmitageIII87
ArmitageIII87
Well...some code would be nice. How are you checking your input? Buffer? Polling? You need to give us (the help) a better idea other than saying. "Man DX is soooos slow. Help!". There could be a lot of factors in having "slow" code. My bet is you wrote bad code and I would be really surprised if DX Input was the culprit. Anywho...when you get some code up I''d be more than happy to take a look.
tj963
tj963
My DX Input is plenty fast. I expect your problem is elsewhere, unless you''re doing something really wrong with DirectInput.

tj963
tj963
Ademan555
Ademan555
Yeah, direct input is great, lets see your initialization code, il betcha thats where the problem is... either that or... are you sure your having the character move at reasonable intervals?
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out hi
Whelzorn
Whelzorn
init. code:
----------------

HRESULT hrInitDirectInput(void)
{
HRESULT hReturn = 0;

if( !pDI ) {
// Create a DInput object
if( FAILED( hReturn = DirectInput8Create( g_hInstance, DIRECTINPUT_VERSION,
IID_IDirectInput8, (VOID**)&pDI, NULL ) ) )
return(INPUTERROR_NODI);
}

g_Layout = GetKeyboardLayout(0);

return(hReturn);
}


well, i doubt that''s where the problem is. What i''m seeing is that when i ran it in windowed mode, it ran fine, but fullscreen, it sucks like this.
01001001001000000111010001101000011010010110111001101011001000000111100101101111011101010010000001110111011010010110110001101100001000000110011001101001011011100110010000101100001000000111010001101000011000010111010000100000011110010110111101110101001000000110000101110010011001010010000001101101011001010111001001100101011011000111100100100000011010010110111001110011011010010110010001100101001000000110000100100000011010100110010101101100011011000111100100101110

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.