Computer Science Canada Missile Help in Missile Command |
Author: | MOUSECORD [ Tue Jun 08, 2004 4:30 pm ] |
Post subject: | Missile Help in Missile Command |
I am making Missile Command i have most things completed except the core of the game (the missiles) that drop from the sky... i just can't figure out a way to program the missiles to fall... or anything ... i need some insight on how to make lines drop gradually from the top if someone could help it will be greatly appreciated... Thanks |
Author: | Paul [ Tue Jun 08, 2004 4:35 pm ] |
Post subject: | |
this should be in "turing help" not "turing submissions", here is where u submit your programs. |
Author: | Tony [ Tue Jun 08, 2004 5:11 pm ] | ||
Post subject: | |||
drop as in
? |
Author: | MOUSECORD [ Tue Jun 08, 2004 5:16 pm ] |
Post subject: | not sure |
yeah i guess that kinda works i didn't think to use a oval i was thinking of using drawline hmmm Ahhh its confusing believe me lol i'm sucha noob to this i guess but i was attempting to make them gradually go down u kno? that is like a spec and i attempted to put a delay.... and it didn't seem to work ya kno not sure |
Author: | Tony [ Tue Jun 08, 2004 5:19 pm ] |
Post subject: | |
you might want to get a hold of valor |
Author: | aside [ Tue Jun 08, 2004 6:16 pm ] |
Post subject: | |
replace the drawfilloval with the procedure you use to draw your graphics, then use delay() to make the program run slower. |
Author: | greenapplesodaex [ Tue Jun 08, 2004 7:19 pm ] |
Post subject: | reply |
check out my missile game http://www.compsci.ca/v2/viewtopic.php?p=51076#51076 |
Author: | MOUSECORD [ Tue Jun 08, 2004 8:17 pm ] |
Post subject: | sweet |
k yeah i got that like... draw.filloval stuff going down like straight down thx for the good start its going good now i think now... i never thought of using ovals... i thought of using lines... i'm not sure if u could use lines also... anyone know if u could use lines too... hmmm quite complecated mb its easier then i think it is... i'm over thinking it i think.... i made it like this.... : View.Set ("offscreenonly:640;400") var y : int := maxy var y1 : int := 21 loop %exit when y < 0 if y <= 0 then randint(y1,0,640) end if y -= 1 Draw.FillOval (y1, y, 2, 2, red) delay(10) %View.Update end loop ( i know it dosn't work....) but i'm making it so it makes a random y1 value so it starts in a differnt time each time... but yeah i kno it kinda draws random dots everywhere... i gotta fix that LOL... maybe theres a way to use a line where the lines made at the top ... then it goes down from the one side ... not sure anyone seen that... |
Author: | aside [ Tue Jun 08, 2004 8:49 pm ] |
Post subject: | |
you can just replace the part drawing the oval with any graphics you like, it doesn't matter if it is a line or circle or oval or box, but it would be better if the missle is large enough to see easily. |
Author: | MOUSECORD [ Tue Jun 08, 2004 9:04 pm ] | ||
Post subject: | New Idea | ||
Okay i got a new idea from valors i studied his game and i see that there is a line drawn at the top horizontally... right then the x2 y2 are subtracted right? so it seems to fall from the sky in a matter of speaking do u see ... well check what i've done so far....
Okay so when u run it u don't see anything i can't get it to show the missile falling can neone see why is there a tweek i need to do...??? |
Author: | aside [ Tue Jun 08, 2004 9:06 pm ] |
Post subject: | |
you used cls right after you draw the line, so it is erased before it is shown. move the cls before the drawline |
Author: | MOUSECORD [ Tue Jun 08, 2004 9:08 pm ] |
Post subject: | hmm |
now it just shows the line where its desination will be it doesn't show it going to it... hmmmm |
Author: | aside [ Tue Jun 08, 2004 9:11 pm ] |
Post subject: | |
well, your variables (x and y) are not changing, so of course it will be the same line forever. change the variables. |
Author: | MOUSECORD [ Tue Jun 08, 2004 9:13 pm ] |
Post subject: | yeah |
yeah but see i'm making x1 and y1 being at a fixed state at the top of the screen and then x2 and y2 are - 1 so that those two points move down the screen u see??? does that make any sense?/? |
Author: | aside [ Tue Jun 08, 2004 9:16 pm ] |
Post subject: | |
yes, you made the x2 and y2 -1 when you are using it, but you are not changing the basic value of them. if x2 is originally 6, then you will have an x value of x2-1=6-1=5 always, use x2:=x2-2 or x2-=2 to actually change the value stored inside the variable |
Author: | MOUSECORD [ Tue Jun 08, 2004 9:28 pm ] | ||
Post subject: | |||
alright thanks man its workin prety good... check it
now see if u run it... (if you can) ... umm its kinda going wrong way lol i can't figure out why do u see??? hmmm |
Author: | MOUSECORD [ Tue Jun 08, 2004 9:44 pm ] |
Post subject: | nm |
nvm thx for the help i got it under control dude,.. i gave ya 10 of my 13 bits... thx Lol!!! |