Java Beginner Tutorial – Creating our Game Class

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

In this video we add our main Game class 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.

Last Tutorial-

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!

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






24 responses to “Java Beginner Tutorial – Creating our Game Class”

  1. markd315 Avatar

    I came here to learn a little more about the Swing library but you're exhibiting some really bad practices here and I'm just going to find someone else. Nothing needs to extend JFrame because you're not adding any functionality that will need to be replicated, you're just muddying the program. Instantiate a JFrame and stop trying to do weird things by overriding the paint function which should already be able to take any subclass of Graphics.

    I recommend that anyone else watching this stop here and find someone who knows what they're doing, because I sure don't and I still know he's still teaching it wrong.

  2. Tanvir Rahman Avatar

    You did not answered two question—-
    1)Why you typed public void paint(Graphics g) and not Graphics2D?
    2)What the paint method will do?

  3. Fatih Erdem Kızılkaya Avatar

    super.paint(g); calls the paint method in JComponent class

  4. Saxafras Uckers Avatar

    At 5:10 on the video, why are you referring to the main class which is presumably calling your game glass, which has the method that is referring to the main class?  that "super" thing is just really confusing to me.

  5. FreddyPaperview Avatar

    Wy do you have to go from graphics to graphics2d? can you not just start in graphics 2d?

  6. Jose Pauig Avatar

    AWESOME tutorial man. Keep it up!

  7. Nick Avatar

    on @4:54 why you typed public…void paint(Graphics g) and not Graphics2D?

  8. Jacob Pickens Avatar

    I have been trying to learn how to program java games for a long time and i have to say this is the best tutorial series i have stumbled upon yet! Thank you!

  9. Jacob Pickens Avatar

    @John Mcleavy that code basically says that that class is going to be a child of the JPanel class.. that means that the game class would inherit the methods from the JPanel class… so to put it simply.. its saying make this class a JPanel

  10. John Mcleavy Avatar

    What does 'public class Game extends JPanel' do? I get the first part, but what does 'extends JPanel' do?

  11. John Mcleavy Avatar

    But what does it do?

  12. Omar .M abdelzaher Avatar

    plz i cant understand that code

  13. MegaPonokio Avatar

    the "super" class the the public static void main(String args[]) {


  14. illdiewithoutpi Avatar

    im confused about how java knows what the "super" class is, which im sure is important to know

  15. RealTutsGML Avatar

    I have Eclipse Juno

  16. Ompmega Avatar

    I've recently downloaded Eclipse and it looks different than this one. I kept getting errors and im sad..

  17. RealTutsGML Avatar

    @KillingPigs123 I was getting no views.. I will start up again when I get back home which will be next Monday.

  18. NerdrageOfficial Avatar

    Your references to game maker is a really effective learning device for game maker users who want to learn java. Thank you for this really awesome tutorial:)

  19. RealTutsGML Avatar

    haha 🙂 I will be uploading one every day 😀 all the up to making menus, enemies, keyboard inputs, mouse inputs, scores, timers, healthbars you name it 🙂

  20. Noah Johnson Avatar

    Ive been waiting for this one ^-^

Leave a Reply

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