LWJGL or JFrame+Canvas?

Hi, newbie programmer here, I’m currently making a 2D top down shooter Java game and I’m using a JFrame and drawing on a canvas. Do I want to try to finish my game using a JFrame and Canvas or should I start learning LWJGL?

My goals are Java video game programming experience and very smooth game play.

Thanks!!!

Stick to Java2D until you are confortable

OpenGL is scary and can lead to death

Well the reason I’m asking is because I’m looking through the LWJGL tutorials and they don’t seem too complicated. I’m currently a Junior in high school so I have tons of hours I can kill trying to get something done over and over.

You could try Slick2D, its a much nicer step than switching to LWJGL directly as it’ll ease the transition from Java2D to LWJGL.

Maybe try to finish your game with Java2D first or use Slick2D as kappa suggested. Then, you don’t take the risk of ruining your project if learning OpenGL takes you much time than you thought. You can still use it later.

In my humble opinion, you should progress step by step. Don’t try to learn too much things at the same time. Split the things you want to learn into small tasks.

Okay, thanks for the feedback everyone! ;D

Slick2D/LibGDX are good ways to “ease into” OpenGL. LibGDX is good for your goals.

But if you really want to learn OpenGL, I’d scrap the higher-level libraries and just go with LWJGL. Slick2D (or even LibGDX for that matter) won’t be very helpful as a stepping stone.

If someone pointing a shotgun to your head and tell you to learn them all, do it with this steps:
Java2D
Slick2D
LibGDX
LWJGL

So can life.

I’d say it depends on how much interest you have in graphics + how much performance you need VS how much you just want it to work.

This is a good list from slowest/simplest to fastest/most difficult.

Just remember when you decide to learn openGL, you are ready to take some risks like lose insanity, waste time (in case you give up), damage your hardware, and accept what ever the result is. I had tried before with lwjgl, draw some rects then quit because I spent same time as spent in making LD entry. So I go back to libgdx and slick2D. Still no waste on java2d knowledge since I use it on java4k and LD48.

When it comes to sprite rendering LibGDX is not significantly more efficient than Slick2D. You can even enable vertex array rendering in Slick, which is pretty much the same as LibGDX’s sprite batch.

Personally, I think that it depends on the starting point you choose and the aim you want to reach. Moreover, I did the opposite movement with different APIs, I started by OpenGL in C, I switched to the competitor of LWJGL and now I use 3D engines most of the time. Being close to the metal was not my aim but a good understanding of low level aspects has helped me to use high level APIs.