Computer Science Canada Little game i made |
Author: | Clayton [ Fri Aug 11, 2006 3:14 pm ] | ||
Post subject: | Little game i made | ||
heres a little game i made, basically there are a bunch of balls floating around, your job is to click on them to make them disappear before time runs out, the object of the game is to get as high of a score as you can, to make more balls press enter on the keyboard, but beware, if you dont clear all of the balls before time runs out you lose, any suggestions would be appreciated EDIT: UPDATED CODE
ENJOY |
Author: | TokenHerbz [ Sat Aug 12, 2006 7:20 am ] |
Post subject: | |
Hmm, Have it so you cant hold down the click button and shake the mouse around to clear them all. Also, maybe have it in a level sequence. Level one = 1 ball, Each progressing level can have +2 balls? good tho |
Author: | Clayton [ Sun Aug 13, 2006 11:29 am ] |
Post subject: | |
ok so what could you do so that you cant just hold the mouse down? ive been trying to use the Mouse. commands but they arent getting me anywhere (specifically Mouse.ButtonMoved, and Mouse.ButtonChoose), as for the level thing thats what i was planning on doing, this is just a kind of basic engine for the game, im still kind of thinking about where to go with it from here:D |
Author: | NikG [ Mon Aug 14, 2006 1:48 pm ] |
Post subject: | |
SuperFreak82 wrote: ok so what could you do so that you cant just hold the mouse down? Add a new variable called mouse_buttons_2 or something, write "mouse_buttons_2 := mouse_buttons" right before your Mouse.Where procedure, and everywhere you're checking for whether the mouse is being clicked, just use "if mouse_buttons = 1 and mouse_buttons_2 = 0 then" |
Author: | Ultrahex [ Mon Aug 14, 2006 3:01 pm ] | ||
Post subject: | |||
Ok, some people are gonna probably yell at me for saying this but anyhow... You Should check to see when they click and when they do click run collision detection, its probably more effective then checking everytime. If you would like me to make a coded example ask i will whip it up as fast as i can. also are you removing the balls from the flexible array ? like after they have clicked on them or are you still running them through your loop? the easiest way to remove the ball is do a main loop with quit like so... (if this is confusing ill try to explain just give me a message)
^ that code is untested btw, but it should work... ive written it many times lets just say |
Author: | Ultrahex [ Mon Aug 14, 2006 3:24 pm ] | ||||
Post subject: | |||||
Ok, i got lazy and actually got around to writing a click point routine also, so when you click it adds up the clicks inside the area specified... at the same time i noticed your collision detection is for squares instead of circles so i decided to help you there also, the first one is using your detection (i drew the square to prove the point)
And here is it with proper collision detection
Take what you will from it. any questions ask right ahead! |
Author: | pj_ladd12 [ Sat Aug 19, 2006 4:43 pm ] |
Post subject: | |
i click it at 56 seconds and then i have to wait a whole minute fer the next ball |