Computer Science Canada posted all me pic with game |
Author: | snaz [ Sun May 23, 2004 8:34 am ] | ||
Post subject: | posted all me pic with game | ||
Hi guys, I am making the asteroid game and I am almost done. I need help to disappear the rock from screen when I shoot with my gun, and also how can I do this by chance if rock hit my plane, then the plan crash and after 2 second, new ship appear. Some one plz help cus this is my first and last assignment in Turing. i post all the pics one more question where do i put background in my game. i am using keyboard not mouse. my friend told me that i have to use function or boolen and i don't know how, you can explain to me or can give me the codes. here are the codes of my game [img]
|
Author: | AsianSensation [ Sun May 23, 2004 10:10 am ] |
Post subject: | |
I believe there is a very detailed asteroid game source released when you install turing. You can always look through that. It covers everything, even Frames Per Second if you need it. |
Author: | snaz [ Mon May 24, 2004 1:07 pm ] | ||
Post subject: | done everything just need help to disapear the rock | ||
the game u get from turing it's pretty advance cus it's university level and i can't understand cus i am in grade 10. i done score and everything i just need to dispaer the rokc when the bullet hit the rock here are the codes
|
Author: | vagyb [ Mon May 24, 2004 1:09 pm ] |
Post subject: | |
could u post the pictures again it says they dont exist :S |
Author: | snaz [ Mon May 24, 2004 3:16 pm ] |
Post subject: | can't post the pics |
i tried to many times but i can't post the pics. i don't know y , pls help me without the pics, i really need help cus i spend me whole weekend try to disapear the rock but i cna't that's y i post here |
Author: | Dan [ Tue May 25, 2004 2:23 pm ] |
Post subject: | |
odd, e-mail me them dan@compsci.ca and i can upload them to this site if you still need help with this. |
Author: | snaz [ Wed May 26, 2004 3:02 pm ] |
Post subject: | posted my pic on website |
hi, i upload my pics on this site www.compsci.ca/userfiles/game.zip now plz some one help and i am not posting my problem again cus i already did. |
Author: | guruguru [ Wed May 26, 2004 6:44 pm ] | ||
Post subject: | |||
That works. |
Author: | snaz [ Thu May 27, 2004 5:17 pm ] |
Post subject: | Can you More specific plz |
my problem was how the rock disapear from screen when i shoote with the bullet adn then automatically new rock appear from screen. and plz be more scpecific so i can understand, thanks |
Author: | guruguru [ Thu May 27, 2004 5:42 pm ] |
Post subject: | |
rockY := maxy % above screen This sets the rock back to the top of the screen. It is gone from the screen and starts agains as if it is a new rock. randint (rockX, .., ..) This makes the rock at a random x location as a new rock would. YOu can plug in your own numbers. Do you have a collision detection set up for the bullet and rock? If not, then I suggest you do so. Test if the bulletY is >= to rockY and if bulletX is in the range of rockX. If so, then it should be easy. When bullet hits rock, rockDead = true, and call the procedure mentioned earlier to renew the rock. |
Author: | snaz [ Thu May 27, 2004 7:30 pm ] |
Post subject: | Hope ur idea work |
Thanks man i hope ur idea will work and i will post it again if ur idea some how doesn't work. |
Author: | snaz [ Thu May 27, 2004 9:36 pm ] |
Post subject: | yo guruguru it doesn't work |
i tried to many times but it doesn't work, what should i do? |
Author: | guruguru [ Thu May 27, 2004 9:50 pm ] |
Post subject: | |
What to you mean 'it doesnt work'. It will work if implemented correctly. Post the code portion of your implementation so me and others can see what you are doing wrong and right. |
Author: | snaz [ Sat May 29, 2004 4:48 pm ] | ||
Post subject: | |||
this is my game codes and pic i already poted
|
Author: | guruguru [ Sat May 29, 2004 6:50 pm ] | ||||||||||||||||
Post subject: | |||||||||||||||||
Quote:
Umm... what is up with this? They are the exact same ![]() 1)
2) You should draw the picture only once in the whole loop. And that should be just before you call View.Update. 3)
4)
5)
To sum up, the first if statement should test to see if rock is dead or the rock is at the bottom of the screen because the same things should happen.
And the new code...
Wow... much shorter and efficient know isnt it? ![]() |
Author: | snaz [ Sat May 29, 2004 9:02 pm ] |
Post subject: | |
Thanks man I really Appreciated ur help, anyway still the rock doesn't Disappear, i will ask my teacher or i will make a new game, anyway thanks for helping me |
Author: | guruguru [ Sat May 29, 2004 9:36 pm ] | ||
Post subject: | |||
That is because you never do a collision test... ![]() And...
You also do 4 tests for a spacebar press when you need only do one test just like you test the up arrow.... This may casue your problem because it never realizes you pressed space hence no bullet was fired hence there is no way for it to collide. |
Author: | snaz [ Mon May 31, 2004 9:10 pm ] |
Post subject: | how can i add level in my game |
i changed me whole game and now the rock disapear, but i want to know how can i add leval in me game, like if u made 100 score then next level appear and in this level the rock come faster than previous one |