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 Physics & Dark A.I. & Dark Dynamix / Found major bug involved in Character Controller jumping

Author
Message
SuperSnake
15
Years of Service
User Offline
Joined: 19th Mar 2009
Location:
Posted: 22nd Apr 2010 02:10
Hi all.

After some frustrating attempts to implement jumping into my game, I finally was able to add in a perfect and smooth jumping system. That is, except for a major bug I just found. The character can perfectly jump while standing, moving forward, strafing, and moving diagonally, except he can't move back-right cause of this little bug. After doing some debugging and playing with code, I have realized that that there are some key combinations that totally screw up Dark Physics. For my game, the Space and S and D key, when pressed together, prevent Dark Physics from doing anything. When Space and S and A, or Space and S and W are pressed, or all the other key combinations in WASD movement involving Space key, everything works fine. Other key combinations are S and Z, Up and Left, and I'm sure there are more.

I even made a new program just to test this code:


Try it out yourself! Now, does anyone know any workarounds, or fixes? Is this just a Dark GDK only problem, or maybe installed Dark Physics wrong? I'm using the new May 2009 update, and perhaps that might have added this bug.

Please help!
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Apr 2010 10:42
Probably the dbKeystate() commands that's messing it up.
Try using "if dbScanCode()=##...".

If i remember correctly Keystate can only sample a limited number of keys.

Regards
SuperSnake
15
Years of Service
User Offline
Joined: 19th Mar 2009
Location:
Posted: 23rd Apr 2010 05:15
Duke E - I tried replacing it with dbScanCode(), didn't work either.

But after doing some testing with dbInKey, I have found that when the S and D key are both pressed, the program will not accept any other key input. When S and A, or W and A, for example, are pressed, the program will continue to accept other key input.

What is the meaning of this?
entomophobiac
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 23rd Apr 2010 10:53
This is usually a keyboard limitation. Buy a keyboard accepting more keys simultaneously -- that's sadly the only solution there is.
SuperSnake
15
Years of Service
User Offline
Joined: 19th Mar 2009
Location:
Posted: 24th Apr 2010 03:09
@entomophobiac

Unfortunately, you are right. I confirmed this when I tested the same combo in FPS Creator and Half-Life 2 on my computer. I don't why my keyboard does this, since it's quite an expensive one, but at least it isn't a bug in Dark Physics.

Thanks for the help.

Login to post a reply

Server time is: 2024-03-28 20:30:48
Your offset time is: 2024-03-28 20:30:48