What libraries/engines do most successful 2d java games use? Just lwjgl?

Please correct me if any information in this post is wrong. I’m new to java development. :slight_smile:

I’ve been making a 2d game for a while. Originally, it was in C++, then AS3, and now I’m porting it to java (I like to experiment, but I think I’m going to stick with java.) When I was working in AS3, I was absolutely amazed at how rapid development was when you used the flashpunk or flixel libraries! Seriously, making games was like drawing a circle. I got a little spoiled, so for a while, I was trying to find a java library that would make game development as fast as the AS3 libraries did. I couldn’t find any.

Whatever, it’s not that big of a deal to go back to slower paced development. Maybe it will be better in the long run. Anyways, the libraries I’ve found suitable for 2d development are lwjgl, slick, libgdx, and jrabbit. Lwjgl looks like it’s the most used. Slick is great, but I’m put off by the fact that Kevin won’t be adding new features (I’m eagerly awaiting TouchAPI, though.) Libgdx looks amazing. Jrabbit also looks very impressive, however, I couldn’t find any tutorials, and it doesn’t look like it’s being updated either.

So far, my choice is libgdx, But I’m having trouble deciding. So, I’m wondering what library might be considered the de facto standard for 2d java games. Could you guys give me some examples of good games, and tell me what libraries they’re using? I’m also interested in what you would recommend. Thanks!

How many successful 2D java games are there? :slight_smile:

Cas :slight_smile:

I’d not worry too much about this, Slick2D as an API is mostly complete and doesn’t really need new features. Its basically just a wrapper for the LWJGL library (which is still maintained) to make it more Java2D like (plus more useful bits). Kevglass does occasionally do bug runs on it and as I understand it there are a bunch of new dev’s that are assisting him now.

The defacto standard, underneath everything, is LWJGL.

Having said that, Sillysoft’s Lux is just plain java2d and he’s making a fortune.

Cas :slight_smile:

Gameplay do most, engine to support it.

I agree with kappa about Slick, there’s no need to worry. You can use MT4J if you need some multi touch support.

In my humble opinion, there is no defacto standard in the Java bindings for the OpenGL API (AndroidGL, LWJGL, JOGL) and that’s the same thing in 3D engines written in Java. I have some preferences but I don’t see any emerging leaders.

But then I don’t see any emerging games using JOGL, either. QED.

Cas :slight_smile:

There are lot succesfull android 2d games that is coded with pure java or libgdx.

We are developing a “big” 2D java game, started with Java2D originally, switched to Slick and currently we are at a point where we are using Slick, but many of the Classes of Slick have been changed/replaced with our owns.
Of course it depends on what you wanna do, but for big stuff and if you wanna use OpenGL directly for graphics, it might be better to just use bits from Slick, kinda like we do.
Slick Util of course for texture loading and audio and stuff.
Then things like font - we are using angelcodefont - many of these things you could write on your own, but it would be a hassle

main problem overall with Slick was: you CAN use OpenGL directly, but it will greatly conflict with your stuff, as blending modes are set or resettet on some points in Slick, and some secondary color overlay and stuff.

Basically, if you do use Slick and OpenGL commands directly, and you experience strange behaviors, it can definitely be Slick code.

Performance is also a big issue with Slick right out of the box: If your game has a lot going on and you want low spec pcs to play it, you will have to use a lot of OpenGL to compensate for Slicks slowness. It renders every graphic as a “QUAD” which is eventually really slow, with much going on - there are attempts for faster stuff like VAO’s but its just broken and doesn’t work and even then VAO wouldn’t be my choice.
The particle system is also useless, gotta do something yourself.

Still, if youre not an OpenGL god and/or dont want to write a bunch of code yourself, it still makes sense to use Slick.

LibGdx is another choice, but cannot speak from experience there.

I thought Wakfu is JOGL.

It appears to have LWJGL in it too. Strange eh?
Quick check - delete LWJGL - game won’t start. So that settles that, then…

Cas :slight_smile:

I just downloaded Wakfu and I see lwjgl.dll and jogl.dll in the installation folder :clue:

Really beautiful game btw, shows how Java can be used for games. :slight_smile:

Yup, seems like they’ve made the switch from JOGL to LWJGL.

Thanks everyone! I think I’m going to go with lwjgl. :slight_smile:

How well you know openGL? If not well start with libGdx and enjoy the utility of easy and performant 2d API. Yet you still have access to openGL.

I’ve made several test projects using OpenGL (Though, never a complete game,) so I’m fairly familiar with it. LWJGL should be fairly easy to understand for me then, right?

Migh be. Still it’s lot easier and productive to use something that have builded utility over bare bones openGL. LWJGL is great but for 2d games I would choose libgdx anytime. For 3d games I would still use libgdx utility like textures, shaderProgram and meshes. Libgdx also give you Android version of the game without any effort and that is place where the market grows.

He said he has opengl experience, lwjgl better.

For a 2D game, I’m not sure why you would prefer LWJGL over an existing library built on top of it for that very purpose. Won’t you just be re-inventing what they’ve already done? If you want to make your own 2D game library for educational purposes or whatever, then fine. But if you’re looking to get stuff done, I’d suggest picking the best tool for the job.

You can use pure opengl with libgdx and enjoy the utility and android compatibility. I have openGl experience and I would not want to build everything from scratch just becouse “I can do it”.

I have given a try to Wakfu under GNU Linux a few minutes ago, it is still using JOGL 1.1.1a. They have made no switch to another Java binding for OpenGL. I’m in close contact with the support team in France, I will ask them if there is a need of confirmation.

Edit: The game doesn’t start if I remove libjoal_native.so, libjogl_awt.so, libgluegen-rt.so and libjogl.so.
Edit2.: The game doesn’t start when I do “mv liblwjgl.so liblwjgl.so.old”