Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / space shooter: firing won't work

Author
Message
10521
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 27th Sep 2009 15:04
the game i'm trying to make is a space shoot em up game but the problem i am having is that, the missile/projectile (bolt.png) that my spaceship (space.png) shoots out, acts exactly like the asteroids that i have loaded into the game in that, you (the player) will shoot out a missile than, when the missile reaches the top of the screen it (like the asteroids) comes back down, it is also way larger than it actually is in real life (this does not happen when the asteroids are not there)here is code
attatched is a picture

Attachments

Login to view attachments
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 27th Sep 2009 18:15
You have set the variable 'b' equal to 5 which is in fact within the number range of your asteroids. So in the for loop here:



you are actually moving your missile in addition to the asteroids.

10521
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 28th Sep 2009 12:10
wait up, i know that but how do i fix it??
10521
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 28th Sep 2009 12:14
ok don't worry i figured it out but, could u tell me a way so that when the missiles/bullets reach past the top of the screen they disapear?
Ovan35
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 2nd Oct 2009 09:30
if you have a background the same size as your screen for instance you can use



could it be that easy?

It was such a small seed... I needed to find out what was growing inside. And there was only one way to find out. So I decided to raise it.

Login to post a reply

Server time is: 2024-10-01 14:26:04
Your offset time is: 2024-10-01 14:26:04