Hi, I am new to processing and I have taken a AP computer science course in high school which I have just completed. I am trying to create my own version of ZORK. This is a old text based computer game that I have found and been playing. I have been inspired to create my own version with processing.
However, I need some help in writing code that would display what the user types. I am relatively new to Processing and I have only started using it for a few days.
I have a general idea about Processing and have tried to work it out. Here's my code so far: Please keep in mind I am quite young and have not had much experience with programming.
String addOn = " ";
void setup() { background(0); size(300,100);
} void draw() { addOn += key; println(addOn); }
I know that the draw() method is called every eighth of a second or so? Correct me if Im mistaken.
I wanted to have the code print out the typed key and update the the addOn every time the user types. So far this code has failed. For one thing, it does not print out the typed message in the output window, or rather my the window my setup() has generated. Another is that it continuously prints out the typed message.