Java Programming: Let’s Build a Game #13

[ad_1]
Produce your own Java game from scratch with this very simple, yet very powerful course available right now

In this video we add textures into the game! If you have any questions then be sure to leave a comment or contact me on twitter; realtutsgml. If you learned something then be sure to leave a like, comment, and favorite.

Have you ever wanted to create games? Have you ever gotten fed up with it being to difficult? Well now is the time to thank me and possibly subscribe because you have just found the channel for you! Game Maker Tutorials, Java Game Programming, Unity3D Tutorials, Batch, C++ and much much more! This is the channel for you, the one stop shop for an exploration of your hidden talent as a game developer. Unleash your potential and go wild with imagination when you finally figure out how to make any game you want!

Visit CodingMadeSimple for more exclusive tutorials and get the help you need to succeed as your very own indie game developer!

Follow me on twitter for exclusive content and interaction with me!

Follow me on Google+ to keep updated with all of my tutorials

Game Maker Studio: Programming
Game Maker Studio: Tutorial
Java Programming
Game Programming
Game Tutorial
Programming Tutorial


Posted

in

by

Tags:

Comments

21 responses to “Java Programming: Let’s Build a Game #13”

  1. life fts Avatar

    FileInputStream will resolve "input==null" problem :))

  2. TheBrohman Avatar

    For those wanting to make the sprite have a trail;
    In your Trail class instead of taking a color, take a BufferedImage, and remove the width and height.
    If you (like me) want to have both trails with color and image, leave the normal trail method be, and make a new one which takes a "float x, float y, ID id, BufferedImage img, int width, int height, float life, Handler handler".

    When you want image, use the buffered image one,
    when you want normal color trail use the color one 🙂 (they can be named the same, just taking different args eg:
    public Trail(float x, float y, ID id, BufferedImage img, float life, Handler handler)
    public Trail(float x, float y, ID id, BufferedImage img, int width, int height, float life, Handler handler)

    🙂

  3. thatmadhacker Avatar

    My Game Is erroring and saying unreachable code in the try catch statement and if i remove the try catch statement it errors

  4. TheCewlCowl Avatar

    Does anyone know how to get the trail to go behind the sprite?

  5. chowchowsonic Avatar

    Whenever I do this, for some reason, at the "}catch(IOException e) {" line, I keep getting an error that says
    "Unreachable catch block for IOException. This exception is never thrown from the try statement body"
    and when i run the game, it says
    "Exception in thread "Thread-2" java.lang.NullPointerException
    at CinderStar.SpriteSheet.grabImage(SpriteSheet.java:14)
    at CinderStar.EnemyBoss.<init>(EnemyBoss.java:24)
    at CinderStar.Spawn.randerp(Spawn.java:50)
    at CinderStar.Spawn.tick(Spawn.java:23)
    at CinderStar.Game.tick(Game.java:92)
    at CinderStar.Game.run(Game.java:72)
    at java.lang.Thread.run(Unknown Source)"
    any help anyone?

  6. Henry Redder Avatar

    Wait where did the res folder come from?

  7. WeiseGuy91 Avatar

    More, give us more!

  8. Bryan Avatar

    what a time to be alive

  9. Jedi Viejo Avatar

    i am having trouble working the first two part of the series i am not able to get the program to work even with what i believe is the right code copied down is there any suggestions to fix this problem

  10. Yannick Muller Avatar

    I've been trying to print the game's FPS on the screen for the user I have got it to print the frames but it prints them way to fast.
    I have made a static int for frames in the game class.
    Then made getters and setters for frames
    and then in the render method in the HUD class I have put
    g.drawString("FPS: " + Game.frames, Game.WIDTH – 60, 15);
    Does anyone know how to make the frames only print about once every two seconds?
    I did try this but it did not seem to work

    int Timer = 0;

    Timer++;

    if(Timer >= 50) {
    Timer = 0;
    }
    if(Timer == 0 || Timer == 1) {
    g.setColor(Color.white);
    g.drawString("FPS: " + Game.frames, Game.WIDTH – 60, 15);
    }

  11. ProjectChicken Avatar

    Bad programming you are creating multiple instances of a class why not make a class called Textures which holds all of these images?

  12. Tudor Lechintan Avatar

    I'd like to have a thread for the game logic and another for rendering graphics. Can you show us what to do?

  13. noob Noob Avatar

    This is the best tutorial series ever!

  14. JoeDon16 Avatar

    I'm sure it would take a multi-part series, but could you do a tutorial on multiplayer games? :3

  15. gamemak0r Avatar

    Would love to see how to make the game full screen with multiple resolutions and have everything in game scale size appropriately. Also capping the fps to 60 would be nice! I watched all the tutorials in the series over a weekend and I'm loving them, I've been coding in Java since February and I've learnt a lot!

  16. DoctorWhoFan967 Avatar

    Can you help me, I have an error.

    Exception in thread "main" java.lang.IllegalArgumentException: input == null!
    at javax.imageio.ImageIO.read(Unknown Source)
    at com.indev.main.BufferedImageLoader.loadImage(BufferedImageLoader.java:14)
    at com.indev.main.Game.<init>(Game.java:57)
    at com.indev.main.Game.main(Game.java:205)

  17. Erich Miller Avatar

    I was stuck on ep3 trying to figure out the keyInput and no matter how many time i try that step, it does not work 🙁 If you or anyone else has a fix for this let me now (Mac OS X, Eclipse IDE EE for java developers)

  18. Ramone Graham Avatar

    RealTutsGML, I have recently been watching your let's build a game series and have really benefited from it. In fact, I have been influenced so much that my friend and I have started developing our own game called "pixel paintballers". I really hope you can take a look and possibly feature it in your uPlay series.

  19. Zack Grey Avatar

    YAY!! Finally! Love the series man!!

  20. Kastytuxx TheGamer Avatar

    Thanks for the tutorials they are awesome i learned a lot

Leave a Reply

Your email address will not be published. Required fields are marked *