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.

Newcomers DBPro Corner / Input string problems

Author
Message
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 27th Apr 2009 23:08 Edited at: 28th Apr 2009 19:57
Hi,

I am creating a game in which players have to enter their names before they play. There can be many players; up to 32 in fact although there is also a single player mode. The problem is that when people are entering their names, the response is very slow meaning that if you touch type, only one in two or three letters will be picked up. Further, if you wish to delete a letter, I recon it takes about 20 or more hits of the backspace button before the program removes a letter. This is the code which I use for gaining the input in single player mode. This suffers from the problem just as badly as multiplayer mode.



Can anyone please guide me on why this problem may be occuring and what I might be able to do to solve it. Thanks in advance,

Lucas Tiridath
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 28th Apr 2009 17:27
You should use float precision when checking the timer (nTime# instead of nTime).

I could probably help with it more, but I would need to see more/all of your code.

LB
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 28th Apr 2009 19:56 Edited at: 28th Apr 2009 22:37
Thanks for your help LBFN. I will try and change all of those nTimes into floats.

Quote: "I could probably help with it more, but I would need to see more/all of your code."


Well, there are around 4000 lines of code and so I'm not sure it would be practical to put it all up here but I can try and add more code. I will look through it at post as much as I think is relivent.


EDIT:
Just realised that although the code is too long to put in a post, I can still attach the DBPRO file and so I have done so. It will not run and the pictures are not included but it will show you all of the code.

EDIT 2:
Oops, I didn't realise you needed the DBA file to view it. I have now added it.

Thanks for you help,

Lucas Tiridath

Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 28th Apr 2009 20:20
I tried downloading it, but the code does not show up. You'll need to upload the .dba file or email it to me.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 29th Apr 2009 16:54
Since I can't actually run the program it is not possible for me to confirm what I think is happening. When you press the BACKSPACE key, sKey$ is going to recognize that you pressed a key, it won't equal "", but won't have any alphanumeric value either.

I would re-write it so that skey$ has to hold an alphanumeric value here:


Hope this helps,

LB
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 29th Apr 2009 18:44
Sir, you are a genius.

That has been annoying me for so long but your solution has finally fixed it.

Thank you very very much

Lucas Tiridath
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 29th Apr 2009 19:52
Great, I'm glad that took care of it.

Good luck with the game. It looks like you have put a considerable amount of work into it already.

LB

Login to post a reply

Server time is: 2024-09-28 06:18:46
Your offset time is: 2024-09-28 06:18:46