Is there anyway to make movement in ti 84 games to not be very stiff. What I mean is that when I hold down a direction my character moves one space then stops for a sec, and then starts moving multiple spaces then stop. Is there a way to fix that?
jakeconer wrote:
Is there anyway to make movement in ti 84 games to not be very stiff. What I mean is that when I hold down a direction my character moves one space then stops for a sec, and then starts moving multiple spaces then stop. Is there a way to fix that?

You must be talking about TI-BASIC. The short answer is no, you cannot make this sort of movement less "stiff"; the way getKey works for DEL and the arrow keys is that it registers one keypress at first, then multiple if it is held, similar to the editing functionality.

However, in z80 Assembly (the "native" language), or Axe (a language that compiles to Assembly), there's a function for that. They have key-registering commands that register a key as always pressed when it is held down. I believe there exist Assembly programs you can use in conjunction with TI-BASIC programs to make this kind of behavior happen. I'll let you know where I find them.
The Quick Key assembly routine makes all keys repeat the same way that the arrows and DEL do, but it changes the codes (not to much of a problem).
You can (probably) avoid this problem altogether by restructuring your code. For example, rather than moving if a key is pressed down, set an indicator variable when you press a key and move according to it's value. The only problem with that is it will keep moving after you release the key.
Assuming you are using pure BASIC and a traditional event loop, and that this feature would be absolutely necessary, you could perhaps include an if statement to include a Rand (the easiest command to make a program pause for a small bit of time.) Only after the first use of a movement key before another action (such as enemy movement) is activated.
What specific calculator model are you programming for? Shells for the TI-83 Plus, TI-84 Plus, and TI-84 Plus C Silver Edition support special Hybrid BASIC key functions that do not implement that delayed key repeat. An example is getKey in Doors CS (via xLIB) and the equivalent getKey in Doors CSE (via xLIBC).
KermMartian wrote:
What specific calculator model are you programming for? Shells for the TI-83 Plus, TI-84 Plus, and TI-84 Plus C Silver Edition support special Hybrid BASIC key functions that do not implement that delayed key repeat. An example is getKey in Doors CS (via xLIB) and the equivalent getKey in Doors CSE (via xLIBC).
He said he was using the TI-84, so he has myriad libraries to use thanks to you Very Happy
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement