We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm working on a game and I've managed to create a highscore in which I put the scores in an array, transform the array into a String and, using the saveStrings, I save the String into a file. After I load the Strings and display the Scores, modifying them as a new best score enters the array. But I want to create a Highscore like an arcade game. The player would provide 3 letters and I would save them on a separate file, but I can't figure out how to make them follow the same orders as the Scores.
Answers
First
find a inputBox here
https://github.com/Kango/Processing-snippets/tree/master/InputBox
Second
work around: you can use sort() on an array.
In order to not to loose the names:
for each entry add the name to the score: score + "#" + name
then sort it
then use split to split score and name again for displaying
@catatau2001 -- re:
One option is saving all the information in Strings separated by a separation character, as @Chrisir describes.
Another option is using
Table
. Add columns, then create new rows with each column filled out, as in the example sketch: