18

I am looking into game programming in Java to see if it is feasible. When googling for it I find several old references to Java2D, Project Darkstar (Sun's MMO-server) and some books on Java game programming. But alot of the information seems to be several years old.

So the question I am asking, is anyone creating any games in Java SE 1.5 or above?

If so, what frameworks are used and are there any best practices or libraries available?

ssube
  • 47,010
  • 7
  • 103
  • 140
Niklas
  • 1,026
  • 2
  • 12
  • 19

10 Answers10

19

there is the excellent open source 3d engine called jMonkey (http://www.jmonkeyengine.com) which is being used for a few commercial projects as well as hobby developers... there is also at a lower level the lwjgl library which jmonkeyengine is built on which is a set of apis to wrap opengl as well as provide other game specific libs...

  • lwjgl encourages more efficient OpenGL usage by favouring some more efficient functions. That way, if you are not an expert at OpenGL, your code is likely to be faster than it would be if you used JOGL, which gives you full access to OpenGL. – Liam Oct 02 '08 at 10:12
  • 5
    Two of the original developers from JMonkeyEngine forked from the project to create Ardor3D (http://www.ardor3d.com/). Its based on the jMonkeyEngine but cleaned up with better structure. – worbel Aug 08 '09 at 01:30
  • My question is: will I want to learn LWJGL before I start jMonkey? Will I have a bigger learning curve if I try to jump straight into jMonkey? – john_science Apr 26 '12 at 20:22
9

http://www.javagaming.org/ is a good source for up-to-date information.

Another framework not mentioned yet is Xith3D

Petteri H
  • 11,779
  • 12
  • 64
  • 94
5

I haven't directly done any game programming but some scene-demo coding and have found that JOGL is really a quite nice framework to work with. It's Java OpenGL so it has a rich 3D functionality and i do believe there are some open source graphic engines done for it aswell.

Fredrik
  • 4,161
  • 9
  • 28
  • 31
4

Also check Pulp core - deals with the most common problems facing Java gaming.

Burkhard
  • 14,596
  • 22
  • 87
  • 108
Pool
  • 11,999
  • 14
  • 68
  • 78
3

Despite the odd name ( pretty sure he's talking about the soft drink...), this site has loads of resources and examples games both 2D and 3D. Coke and Code

basszero
  • 29,624
  • 9
  • 57
  • 79
3

As an update, a couple of the JMonkeyEngine guys have forked that project to create Ardor3d, a new version of which was recently released, so its still under active development. Project Darkstar is also still actively developed. Indeed DarkMMO an opensource example Darkstar game is being currently refactored to use the latest version of both Darkstar and Ardor3d.

cordinc
  • 63
  • 5
2

As mentioned by all others in this topic, there are plenty of excellent libraries/engines available for building games in Java.

Game programming in Java is definitely feasible. Keep in mind though that, as with any other language, getting real-time performance will always take some effort. I wrote a small article about my experiences with using Java for our 3D breakout game 'Caromble!'. It is mainly about the steps we had to take to get our game running smoothly.

http://www.caromble.com/2013/05/java-game-programming/

Pjotterke
  • 121
  • 2
2

GTGE (www.goldenstudios.or.id) is an excellent 2D Java Game Library, with tutorials and an extensive API. It has gone open-source in its latest version, and the source can be downloaded, browsed, etc. at gtge.googlecode.com.

MetroidFan2002
  • 29,217
  • 16
  • 62
  • 80
1

I like to code games a bit in my free time. I use a library called slick2d which makes programming the back-end a lot easier. For example, you can copy/paste the example 'main' class file from the Slick2d Wiki and you have your game loop as well as the Update() and Render() methods all ready to go.

Slick 2d is based on LWGJL and uses it to load images and do other cool things with OpenGL. There is also a bunch of helpful topics at: http://www.java-gaming.org/

  • Are the examples listed in the game site or are they listed on a web page. I like to make JAVA graphics and thought that I might move into some simple game graphics. I have done some in 2D but not 3D. – Doug Hauf Dec 27 '13 at 14:01
1

I've made a list of a bunch of tutorials that should be of help

Community
  • 1
  • 1
davidahines
  • 3,976
  • 16
  • 53
  • 87