Added: 1 year ago
From: MrJavaHelp
Views: 11,978
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (32)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • You leave a lot out in the videos, you include it in the source code but, it would be much more professional if you showed everything in the videos.

  • I have been playing around with this and I can't seem to figure out how to make the bullets able to shoot in each of the four directions.

  • @MrJavaHelp How to just draw a pixel??? or a rectangle?

  • Dude, this tutorial you made helped me out SO MUCH for my final project in my game development class! Thank you very much!

  • I dont really understand the purpose of the Array List, is there no other way to do it without the Array List?

  • Control + Shift + F To fix up your code and make it easier to read.

  • if i leave space pressed infinite bullets appear :/ what can i do about it?

  • @geronimoaris Add a counter which checks how many bullets are alive and have it increment when a new one is made and decrement when an old one is destroyed. Then have some code check if that counter is equal to the max and don't let it make new bullets if it is.

  • @geronimoaris Use a timer with a thread class. and allow the space to only be effectively fired every 30-40 ms.

  • whats the w int?

  • i dont mean to be a stickler for detail, but it might help people who are just learning if you used more "proper" coding terminology. for example, you consistently referred to methods as classes, which left me staring at my code for 10 minutes wondering what i had done wrong. but besides that the videos are absolutely AMAZING!!! thank you so much.

  • were do i go to make the bullet fire higher up (im very new to most of this)

  • @MrSoluther 6:20 He takes about the bullets creation and he uses the character's height divided by 2, this is the figure you need to change.

  • I completely understand... none of it.

    just kidding, i actually get most of it.

  • you are a life savior!!

    thanks!

  • he bought a new mic thumbs up for that

  • can we get a copy of this code plsss??

  • can we get the copy of this code?? plssss

  • what game engine do you use?

  • @EPHRAIMDify none

  • were u using netbeans to write your programs?

  • Hi, I have a question. I've made it so my bullets fire at y-coordinates "y+33" so they come from around my chest area. The problem is that if I jump all the bullets jump with me. I just want them to always be around my chest when they're launched, not when they're already flying. Would be cool if someone could give me an explaination on how to do this. :)

  • How do you make it so that you can fire multiple bullets, so like have it fullyautomatic

  • when my game loads my character doesn't show up till it loads the next image by walking forwards.

  • why is the arrayList static?

  • @liorlolobobo Just so that every other classes has access to it and it is the same array across all classes.

  • @MrJavaHelp can't you just make a method : Bullet[] getBullets() ?

  • @liorlolobobo You can!

    You can do a lot of things differently, but the way I did it seemed the most logical:

    - Creating an array of all bullets.

    - Adding to array as the fire() method is called (user presses space).

    - Checking constantly if any of the bullets in the array have a coordinate greater than 700 (out of screen) and if so, removing it from array (done in actionPerformed method).

    - Lastly, going through whole array and printing each bullet (in paint method).

    Thanks,

    MrJavaHelp

  • @MrJavaHelp Hi there, i'm using Bluej to create my game, so would the steps involved be any different? i've also inboxed you about it :) thanks

  • @manzrnet no they wouldn't. java is java.

  • Man, your graphics are way awesome.

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