Computer Science Canada Whack a Mole |
Author: | brazilian_princess [ Tue Jun 10, 2003 12:39 pm ] |
Post subject: | Whack a Mole |
alritey, for my final project im makin a whack a mole game. the only problem is i suck... so, i dont really kno how to make the moles keep poping out without waitin for the user to click on one before.... i dont kno if i explained that to well, but if i did, can ya help? thanks |
Author: | Tony [ Tue Jun 10, 2003 1:21 pm ] |
Post subject: | |
if you have no idea how to do something, maybe you should pick another project though then again... that way you not gonna learn anything To keep moles popping in/out, you just use a timer. While running the waiting loop, also check for time, and if mole is out for long enough, its time for it to pop back in |
Author: | naoki [ Tue Jun 10, 2003 5:20 pm ] |
Post subject: | |
make the mole popping out a process and if it is out of the hole you set a boolean to false then use mouse.where and if it clicks in a certain area while the boolean is false then you've scored a hit. end the mole process for that hole. you'll basically want to loop the mole processes and use mouse.where, and don't forget about tony's timer thing too |
Author: | Andy [ Tue Jun 10, 2003 5:35 pm ] |
Post subject: | |
ya or u can have the mole to be the a couple of coulors then use whatdotcolor |
Author: | AsianSensation [ Tue Jun 10, 2003 6:03 pm ] |
Post subject: | |
don't listen to andy(dodge_tomahawk) he is on crack. if you want a fast efficient program, don't use whatdotcolor. whatdotcolor takes too much memory, and since your checking to see if you've hit the mole, whatdotcolor will just be a waste of memory. Instead, just set restrictions on the x and y value of where your mole is. |
Author: | Andy [ Tue Jun 10, 2003 6:17 pm ] | ||
Post subject: | |||
die meng... whatdotcolor is not slow, not if ur checking only one pixel... and but ur rite about the unefficency tho just have an array of now many hows there are
this is basicly what ur looking for numholes is how many holes u have, circleradius is the radius of the holes if u wanna have a score, just have a new variable and add one to it if a mole is wacked |