Closed GoogleCodeExporter closed 9 years ago
I probably destroyed it somehow. Try using the plugin from r22.
Original comment by KrossX3
on 13 Nov 2010 at 5:59
Yes, that seems to work, HOWEVER, r22's PuruPuru cannot do diagonal analog
directions, which makes it kind of useless. I'll try other revisions' plugins I
guess.
Original comment by jzachar...@gmail.com
on 14 Nov 2010 at 4:58
Got it, r27's works with diagonals. I'll keep trying different revisions and
see where it starts to go funny with the speed.
Original comment by jzachar...@gmail.com
on 14 Nov 2010 at 5:08
Ah, it's all the way back to r42, I see. That is, r42's PuruPuru works, and
r43's does not. I'm not really sure why. The only change to Puru in that
revision is "Now supports input from Keyboard. (and mouse buttons too)." Maybe
I'm an isolated case, because I have a fancy keyboard with extra buttons.
Specifically, it's a Saitek Cyborg Keyboard, Revision 1. It needs proprietary
drivers from their site to work right. Can I provide more information?
Original comment by jzachar...@gmail.com
on 14 Nov 2010 at 6:10
No, that should be enough. Thanks.
Original comment by KrossX3
on 14 Nov 2010 at 2:15
Try this one: http://www.mediafire.com/?xk104oczacs8qj4
See if it works any better. Make sure to have keyboard input disabled though.
Original comment by KrossX3
on 14 Nov 2010 at 2:59
Yep, that did the trick! But you're right, keyboard input makes it slow down
again.
Original comment by jzachar...@gmail.com
on 14 Nov 2010 at 8:06
That's it then. It seems using GetAsyncKeyState is quite expensive, on your
system at least.
Original comment by KrossX3
on 14 Nov 2010 at 9:04
Well, my machine is 6 years old...it's getting pretty tired.
Original comment by jzachar...@gmail.com
on 14 Nov 2010 at 9:09
Does using Keyboard Only still cause a slowdown? And how about using the
drk_maple plugin for keyboard input?
Original comment by KrossX3
on 14 Nov 2010 at 9:26
Yep, keyboard only does it. However, drk_maple doesn't cause the slowdown. I
used Xmapple before with drk_mapple.
Original comment by jzachar...@gmail.com
on 14 Nov 2010 at 9:33
Give this one a try.. see if it improves at least a little. Warning! It's a
very experimental version and your computer may explode.
http://www.mediafire.com/?fqj2k6bm09puwpv
Original comment by KrossX3
on 27 Nov 2010 at 6:37
Yeah hold on, I'm out of town from turkey day and don't have my computer, I'll
try it on Monday.
Original comment by jzachar...@gmail.com
on 27 Nov 2010 at 12:28
OK, just tried it, did NOT work, same behavior as before. Again, drk_maple
works fine for this revision.
Original comment by jzachar...@gmail.com
on 29 Nov 2010 at 4:37
Yah, thought so. Still worth to try. Gonna have to just use the Events.
Original comment by KrossX3
on 29 Nov 2010 at 5:16
@KrossX3:
A quick optimization would be to parse off the configuration file
the used keys , then put them in a buffer as reference.
Remove the 255 get key state calls , and iterate through the referenced keys
and update their state.
The next thing to do is to replace some hardcoded branches with constant maps ,
then do simple iteration<->mapping.
Original comment by Dimitris...@gmail.com
on 29 Nov 2010 at 3:06
Oh, that's an interesting one. But you would still be checking for up to 16 or
so keys for each controller connected using keyboard, as opposted to just
update the key(s) in use. It could take like 64 checks top, as opposted to just
3-4 checks for a normal keyboard in use when using the KeyDown/Up events.
Original comment by KrossX3
on 29 Nov 2010 at 10:11
@KrossX3:
Here is what im thinking :
1.Remove the 255 calls
2.Use the configuration file to fill the key buffer for each controller port
3.Drop completely the winap getkeystate and create an SDL input mapper function
during initialization
4.Make use of SDL_PollEvent http://sdl.beuc.net/sdl.wiki/SDL_PollEvent
for efficient event handling.It makes use of WINAPI's low level input
messages and reports any input event to the event structure passed in.
This applies for controllers and everything.
5.Optimize 2/3byte compares.
Examples:
3byte compares , can be replaced with 1 24bit load,
and hex constants:
This :
if(input[0] == L'L' && input[1] == L'X' && input[2] == '+')
..huge else if branch follows...
Turns to :
switch( (u32)( (input[0] << 24) | (input[1] << 16) | (input[2] << 8) )
{
case 0x768843:
code
return ..;
case ...
}
2byte compares , can be replaced with 1 16bit load,
and hex constants:
if(input[0] == L'L' && input[1] == L'X')
..huge else if branch follows...
Turns to :
switch( (u16)( (input[0] << 8) | input[1] )
{
case 0x7688:
code
return ..;
case ...
}
:)
Original comment by Dimitris...@gmail.com
on 30 Nov 2010 at 6:02
Great! That sounds like a plan. :)
Now get in the IRC already!
Original comment by KrossX3
on 30 Nov 2010 at 6:50
[deleted comment]
I tried to go to #nullDC, but I forgot I'm running a Tor relay on another
machine, and because I'm behind a router, I got IP banned from EFnet for awhile
because of this. Ho hum...
Original comment by jzachar...@gmail.com
on 4 Dec 2010 at 2:55
Don't worry, I was telling DimitrisV22 to get into the IRC.
Original comment by KrossX3
on 4 Dec 2010 at 4:49
Can this be checked again with r120 please?
Original comment by KrossX3
on 20 Dec 2010 at 10:44
I would test it, but I'm away from my machine again, and I'm currently fighting
insomnia...it's 5:30AM now, or thereabouts. So I'll test it later.
Original comment by jzachar...@gmail.com
on 21 Dec 2010 at 1:31
Well, I just tried it. It is much better than it was, but it's not quite to
running completely full speed yet. It's around 90-95%, so there is quite a bit
of sound skipping. When I have no keyboard input, the sound is fine. I don't
know how much more you want to optimize it, but it's kind of a moot point to me
because I can play fine with a gamepad.
Original comment by jzachar...@gmail.com
on 22 Dec 2010 at 3:53
One of the main things causing huge latency is the event handling/processing.
It would be wise to start fixing that first before anything else.
Original comment by Dimitris...@gmail.com
on 22 Dec 2010 at 4:59
How about this one: http://www.mediafire.com/?rc7rl05u1ue1i80
Original comment by KrossX3
on 22 Dec 2010 at 6:19
Okay, that one seems to be running at full speed. Thankies.
Original comment by jzachar...@gmail.com
on 23 Dec 2010 at 4:40
This issue was closed by revision r125.
Original comment by KrossX3
on 23 Dec 2010 at 2:20
Original issue reported on code.google.com by
jzachar...@gmail.com
on 13 Nov 2010 at 12:02