Author Topic: [83+ xLIB] Faster XLIB?  (Read 5980 times)

0 Members and 2 Guests are viewing this topic.

threefingeredguy

  • Guest
[83+ xLIB] Faster XLIB?
« Reply #15 on: July 10, 2006, 03:36:00 am »
You canc1-->
CODE
ec1Repeat getkey
End
Ans->Kc2
ec2or if you need to update after a bit of a delay, I do this, though there may be a better wayc1
-->
CODE
ec1For(A,0,10
getkey->K
If Ans
1-A
Endc2
ec2

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ xLIB] Faster XLIB?
« Reply #16 on: July 10, 2006, 12:39:00 pm »
yeah thats what reuben quest did, because key detection was slow
unfortunately it wouldnt work in metroid, altough I have a lil idea how I could make it work but that would make enemies move at insane speed when not walking

Offline Speler

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 857
  • Rating: +6/-2
    • View Profile
[83+ xLIB] Faster XLIB?
« Reply #17 on: July 10, 2006, 03:53:00 pm »
ThreeFingeredGuy the first code doesn't work, you want:

Repeat Ans
getKey->K
End

Or for delay, you can optimize to:

For(K,0,10
getkey->K
End

Demon

  • Guest
[83+ xLIB] Faster XLIB?
« Reply #18 on: July 10, 2006, 04:01:00 pm »
What about this if you need more responce speed?

Repeat Ans
    getKey
End
Ans->K

or don't even use K at all?  Or put the getkey into a FINANCE var?

Offline Speler

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 857
  • Rating: +6/-2
    • View Profile
[83+ xLIB] Faster XLIB?
« Reply #19 on: July 10, 2006, 04:09:00 pm »
That last code is fairly pointless because there is no need to worry about speed when waiting for the user to press the button so all you have to do is optimize for memory (no offence), but the FINANCE variables is something I will forever incourage (hehe).

crzyrbl

  • Guest
[83+ xLIB] Faster XLIB?
« Reply #20 on: July 10, 2006, 06:16:00 pm »
pyro....your sig takes forever...

Offline Spellshaper

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1690
  • Rating: +0/-0
  • This is me. Or maybe not.
    • View Profile
[83+ xLIB] Faster XLIB?
« Reply #21 on: July 10, 2006, 10:27:00 pm »
for modem users, that is XDsmiley.gif

still, you should *try* to keep your sig size down bytewise...