Hello,
Take a look here:
https://processing.org/reference#output
Experiment a little.
I was able to do this with saveStrings() and loadStrings()
This code is not complete:
String [] saved;
int score;
void setup()
{
size(200, 200);
//loadStrings()
}
void draw()
{
}
void keyPressed()
{
score++;
println(score);
}
void mousePressed()
{
//saveStrings();
}
I was able to store and recall a score with that basic template and a file to save these.
There is code missing.
:)