How do I start Java Game Development?

Java game development is not for the faint of heart. Like everything else, it requires patience, comprehension, and practice.

These paragraphs are part of a tried-and-true track of experience levels that would be very beneficial to your growth. You don’t have to start at the beginning, but can jump in at any spot you know you are in.

Beginner, the most important and required step:
-For now since you are a beginner, learning Java syntax, core classes, and command line stuff is very important and should be your first priority. Do not jump straight into graphics. Make basic command line games using ASCII art. Make almost any game you can think of for the command line. Eclipse is a very useful and powerful tool and as much as you may like it too, I also recommend you to start with the command line. Write an entire command line app using just notepad, compile it, and run it. Start using packages and experience the pain and confusion of compiling and running programs that are in packages.

OPTIONAL. Nowadays, it is best to start with LibGDX. Slick2D is another library with a slightly easier learning curve, but it’s buggy, no longer maintained, and many years old.
-When you feel you know and understand Java well enough, jump into graphics using Java2D. Java2D is the java.awt packages and subpackages. These allow you to do custom drawing and offer very, very powerful tools for making 2D graphical apps and games. Also you may learn Swing, Java’s GUI widget toolkit. It offers nice tools for making GUIs (Graphical User Interface).

-While you are becoming proficient with Java2D, you will learn and accept one grave and heart-breaking truth: Java2D is slow and unsuitable for professional and graphically expensive games. However, despite this shortcoming, it is the perfect playground for gaming beginners. I advise you to not advance until you have learned basic game systems, designs, code architectural organization, etc…
OPTIONAL

-Finally, when you notice you are ready for hard-core, speed-hungry games, you may jump into the OpenGL bandwagon. OpenGL is a portable high-level API to interface with graphics cards. It is portable in the sense that it works on almost all graphics cards and all systems, and high level since it abstracts away the differences in graphics card functions and drivers. This means you get to skip the slowness of Java2D and be able to directly access the power and performance of raw graphics card awesomeness. This may all seem neat and amazing but there is 1 drawback…its API is written in C (another language). This means you can’t really access it directly from Java without writing native code doing a lot of complicated stuff. Well fear not, a bunch of really cool people wrote a library that lets you access these functions and more, and these cool people named it the Lightweight Java Game Library (LWJGL). There is also another group of cool people who wrote a similar library and called it JOGL. They are both almost exactly the same and the only difference is in your perception of it and your choice.

-There are some libraries that try to simplify your life when making 2D/3D games and GUIs using OpenGL. Such tools include:
-Slick2D: an open-source library whose API looks very similar to Java2D yet uses LWJGL underneath. So it lets you make 2D games without worrying about the details underneath. However, it is best if you understand the underlying inner workings so you can gain experience and be able to understand any problems you run into.
-libGDX: open-source library that easily allows you to make OpenGL applications on PCs, HTML5, iOS and Android
-Java Monkey Engine (JME): fully featured Java 3D engine built on OpenGL (LWJGL, JogAmp, Android GL, …) that has tons of tools for making professional-looking games
-jPCT: Another 3D engine built on LWJGL that to some is simpler and easier than JME yet isn’t as powerful and proprietary.
-Ardor3D: A recently emerging 3D engine also built on OpenGL (LWJGL, JogAmp) that looks very promising, from what I’ve heard it combines the ease of jPCT and the power of JME. (discontinued in March 2014)
-JogAmp’s Ardor3D Continuation: A subset of Ardor3D actively developed and maintained exclusively based on JogAmp
-Themable Widget Toolkit (TWL): A GUI widget toolkit. It is very powerful and allows for full customization of your widgets. This is the “Swing” version of OpenGL :wink: An alternative to TWL is scene2d.ui which is part of libgdx.

These tools and engines are nice to use if you don’t want to get too much into the details of OpenGL. However, it is better if you do because it is just nicer to understand what is going on behind the scenes and will help you debug any problems you run into. These libraries just ease the lives of those who already understand OpenGL, rather than helping ignorant impatient programmers who want to get their hands dirty in 3D designing.

Well this was a long post, and I hope you now understand the current situation of Java gaming and have a basic timeline of your future :slight_smile:
If you need any help or assistance, we are always here to guide and point you along the way, not to spoon feed you with code. Remember, we’re all a bunch of chill dudes sacrificing our time to help newbies because we enjoy it 8)
You can also join us at the #lwjgl channel on the Freenode IRC network for more help, but know that if no one responds, do idle since we are all on different timezones (half of them live in Europe!).

P.S: You can contact another group of cool people at the #jogamp channel on the Freenode IRC network for more help.

Good luck!!! :smiley:

LINKS:
-Java Resources: http://www.java-gaming.org/index.php?action=resources
-OpenGL tutorials - Java ports - Another Java port

@Riven, the save feature of in-post editing doesn’t work :S

@ra4king
I did little modify and the save worked :slight_smile:

[quote]-Slick2D, also mentioned above, is an open-source library whose API looks very similar to Java2D yet uses LWJGL underneath. So it lets you make 2D games using the same API you will soon learn and love without worrying about the details underneath.
[/quote]
Doesn’t Slick use the depreciated parts of OpenGL?

Doesn’t Slick use the depreciated parts of OpenGL?
[/quote]
Deprecated*

Yeah, but it’s useful for learning how to design games without worrying about graphics yet, and without suffering through Java2D :stuck_out_tongue:

It’s a possible approach but the reverse one has some advantages too. In my humble opinion, it is better to understand the low level APIs before using middle level APIs and high level APIs, it drives you much more autonomous even though it is harder, understanding OpenGL is helpful to use 3D engines based on it, you’re able to fix almost any bug in their implementations and you can use them with a bigger ease when you understand the underlying concepts on which they are based, I explained that here.

Geez, someone put in a ‘let me google that for you’ link in named ‘the best tutorial ever’ that googles java tutorials.
The last thing that beginners appreciate is a patronising tutorial/teacher.

Nobody ever said Slick2D used OpenGL…

Welp, time to port my game for the 50th time.

I refrained from using it because I thought it only used software rendering. I should actually do my research next time.

Geez, someone put in a ‘let me google that for you’ link in named ‘the best tutorial ever’ that googles java tutorials.
The last thing that beginners appreciate is a patronising tutorial/teacher.

Nobody ever said Slick2D used OpenGL…

Welp, time to port my game for the 50th time.

I refrained from using it because I thought it only used software rendering. I should actually do my research next time.

Why bother? You will just end up porting to LibGDX in the end… :stuck_out_tongue:

Why are you against OpenGL?

It’s the opposite.

I was using Java2D for my project. I have nothing against OpenGL.
Though it can use OpenGL under the hood, it still isn’t really that good.

I didn’t really feel like using LibGDX or writing my own LWJGL utility, so I stuck with that. :emo:

Ah, oh I see. Yeah, that would work too!

Why bother? You will just end up porting to LibGDX in the end… :stuck_out_tongue:

Why are you against OpenGL?

It’s the opposite.

I was using Java2D for my project. I have nothing against OpenGL.
Though it can use OpenGL under the hood, it still isn’t really that good.

I didn’t really feel like using LibGDX or writing my own LWJGL utility, so I stuck with that. :emo:

Ah, oh I see. Yeah, that would work too!

Great post. In the past two months I’ve taught myself pretty much everything here and learnt most of the basic concepts of game development. Although I was planning to progress on to LibGDX anyway, this post is nonetheless helpful. In the near future I’ll finish up teaching myself about collections then start learning about OpenGL. Once again, thanks for the great post. :slight_smile:

Great post. In the past two months I’ve taught myself pretty much everything here and learnt most of the basic concepts of game development. Although I was planning to progress on to LibGDX anyway, this post is nonetheless helpful. In the near future I’ll finish up teaching myself about collections then start learning about OpenGL. Once again, thanks for the great post. :slight_smile: