Java Game Programming for Beginners - #11 - Shooting a Bullet

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,051
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 11, 2011

Visit www.thejavahub.net and join the network! Feel free to ask any questions you may have in the forums or in the comments!

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (TheJavaHub)

  • My bullet won't move at all.

  • @Thelordberzerker97 Did you copy the tutorial exactly?

  • I have a problem with the space released part. The program doesn't seem to want to put readyToFire to true since I can't refire the bullet. I think the problem lies with the bullet not being reset to (0,0,0,0) since I tried by putting if(y<=20). That would mean it would dissapear in the middle of the screen right? but it won't so you got any idea what the problem might be?

    sorry for the bad english.

  • @NightShroud092 Hmm, it's hard to say at the moment. Head over to TheJavaHub Forums @thejavahub(dot)net/forums and post your source code in the help section. I'm sure we can help you from there.

  • thx man but your starting c++ already?

  • @Ninjason1337 I'm just starting to make C++ tutorials, it doesn't mean I'll stop these ones :)

see all

All Comments (21)

Sign In or Sign Up now to post a comment!
  • are you ever going to finish this game?

    also: if your bullets don't move the most obvious solution would be to check if somewhere you've put by instead of bullet.y(I had this issue, and noticed I had the x and y of the fillRect set to by, and bx instead of their bullet alternatives.)

  • how would i make an enemy and then to make it disappear when the bullet hits

  • With regards to programming 2d/2.5d games, what would you suggest? C++ or Java?

  • The copying off your website is confusing... Are we supposed to call the file "Main.java", as the forum says, or "Shoot.java", as your NetBeans says?

    Btw.., really nice tutorial ;)

  • Can i still enter the logo compassion?

  • oh my GOD this is glitchy.

    I don't know why, but the bullet keeps freeking out- it will dissapear randomly and start again at the gun, occasionally fires when I hit left or right, sometimes refuses to fire at all.

  • My game windows doesn't open at all! I open the program in NetBeans, then i right-click and choose run file. It says Build sucsessful, but nothing opens. Plz help me!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more