Ok, so for my Plinko (TI-Basic) game I have been working on for the past few months, I've decided to make a high score list. Right now I just have numbers in a list telling the user the high scores. I would like to be able to add names to it. What would the best way to go about doing that?

Thanks!
What you could do is use the Doors CS Hybrid Basic Libraries to write data to an appvar. With that, you can store any type of information, not just numbers. However, something that might be challenging and fun would be a way to encode short names into numbers so you could store it into a list with the high score.
You could make a list for each name if you don't want strings and have like a is 1, b is 2 etc.
Or as souvik already said, you can use Celtic3 (which is included in DCS) to store in a appvariable.
You could encode the name as part of the list element.

For convenience, store the alphabet "ABC…Z" to Str2.

If the score S is 5000 and the name Str1 is "ABC":

Code:
S+sum(seq(inString(Str2,sub(Str1,X,1))/10^X,X,1,3

= T = 5000.123

To decode the string from T:

Code:
:"?
:For(X,1,3
:Ans+sub(Str2,int(10fPart(fPart(T)10^(X-1))),1
:End
:sub(Ans,2,3
  
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