【GameMaker 】Word Typing Game

create 

 words=ds_list_create();//create a list ds_list_add(words,"ham","eggs","potato","cheese","pizza","chocolate");//add some words size=ds_list_size(words);//get size word=words[|irandom_range(0,size-1)];//choose one word at random keyboard_string="";//set to "" timer=100;//set as 100 - to be used as a timer


 step 


 if keyboard_string==word//check if player typed correctly { score+=10;//increase score word=words[|irandom(size-1)];//choose a new word keyboard_string="";//clear string health=100;//reset timer } timer-=1; if timer==0 { score-=10; word=words[|irandom(size-1)]; keyboard_string=""; timer=100; }



 draw

 //drawing draw_text(100,100,"Word To Type: "+word); draw_text(100,150,"Word Typed: "+keyboard_string); draw_text(100,200,"Score "+string(score)); draw_text(100,250,"Time "+string(timer));

No comments:

Top 3 UX Design Articles of 2024 to Remember

Based on most subscriptions ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­...

Contact Form

Name

Email *

Message *