We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Project Help
Page Index Toggle Pages: 1
Project Help (Read 674 times)
Project Help
Apr 17th, 2007, 1:01pm
 
Right, the idea I have for a project, due in 2 weeks, is a typing game, basically, you have to type words in within a time limit.

Far as I see it, in english, the parameters I would need are:

Input and display, e.g. as you type the word "bucket" in, parts of a picture of a bucket would display on screen.

Successful completion within a time limit brings up a new word

Unsuccessful brings you back to the start

The input for the typing seems easy enough, but what would I need to create a back to start method, and "new word" method as well?  Would it mostly consist of "if" commands?

Pleae bare with any of my naiveity as I'm only 3 weeks into its basics
Re: Project Help
Reply #1 - Apr 23rd, 2007, 1:20am
 
you can do something like that:

void draw(){
 switch(step){
   case 1: newWord();
                                                     break;
   case 2: start();
                                                     break;
   case 3: gameOver();
                                                     break;
 }
}

where the variable step indicate in wich part of your game you are.
Just an idea, don't know if it's the best solution Smiley
Hope it help.
Cheers,
Simon.
Re: Project Help
Reply #2 - Apr 24th, 2007, 5:39pm
 
thanks ^^
Page Index Toggle Pages: 1