Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: shooting bullet

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default shooting bullet

    helo guys, am building a shoot game using rectangles as my bullet. Right now when i shoot a bullet, it moves in the required direction but goes off the frame b4 am able to shoot another. I want to be able to shoot more bullets at keyPressed while the one shot already is still visible in the frame. Please help me out


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: shooting bullet

    How have you animated the bullet? If the whole program is run in a single thread, the bullet movement probably captures the program's attention until the bullet becomes irrelevant. If in Swing, are you using a Timer? Show us some code, especially bullet animation, so that we can help.

  3. #3
    Banned
    Join Date
    Jul 2013
    Posts
    49
    Thanks
    1
    Thanked 5 Times in 4 Posts

    Default Re: shooting bullet

    try using a timer for the bullet...and as greg said show us some code

Similar Threads

  1. Shooting animation with one image
    By poldz123 in forum Java Theory & Questions
    Replies: 4
    Last Post: February 16th, 2013, 11:22 PM
  2. Not sure how to implement a bullet system?
    By joshnerd557 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 14th, 2013, 10:00 AM
  3. [SOLVED] shooting fire ball 2d
    By hwoarang69 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 22nd, 2012, 05:27 PM
  4. [SOLVED] Simple Spaceship Shooting Game
    By bj12marion in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 20th, 2012, 08:17 AM