Java2D -> LWJGL = easy?

how easy it is to convert a 2D game into 3D using LWJGL? i know some opengl, but not much.

this is how i’d like to convert a game:
2D using software -> 2D using LWJGL (just quads instead of sprites) with fixed camera -> 3D using LWJGL (boxes instead of simple quads) with fixed camera -> 3D using LWJGL (proper objects instead of boxes) with fixed camera

and somewhere add moving camera (as in get scrolling for free).

is the rendering loop all that needs to be changed? just investigating the possibilities here, haven’t looked at LWJGL at all :slight_smile:

Well that is exactly what I use lwjgl for… And tbh it is much easier to create 2d with lwjgl and gives much better performance than java2d… for me at least :slight_smile:
check the Schlug Attuck post in the “Your games here” forum to see what I am talking about.

I’m using OpenGL to make a 2D game. I was using GL4Java, now I’m porting to LWJGL, though it has been going okay there are a few points I want to make:

Quads potientally are a different kettle of fish. Collision detection might need to be changed.

LWJGL does not use, as far as I know, AWT and as such if you use keyboard and mouse liseners in your game, which I expect you will to make your player move around screen, then these will have to be changed to LWJGL versions, which uses polling of mouse and keyboards rather than event passing (event driven stuff does tend to be slow).

So there might be more than just changing the rendering loop but OpenGL is a good way to go IMHO.

i was going to keep my AWT stuff at first and then if necessary move to LWJGL completely. speed is not a concern right not (~250+ fps using AWT and jbanes timer).

is there a problem with using AWT and LWJGL together?

[quote]is there a problem with using AWT and LWJGL together?
[/quote]
Yep, LWJGL isn’t based on AWT so there’s no Graphics backing, no way of rendering AWT components on the OpenGL canvas, no hook into AWT events etc. You’ll have to roll your own or petition for AWT support, I’m afraid.

awt isn’t just about graphics :slight_smile:

i was more referring to other stuff like java.awt.geom etc

I’m quite happily using some AWT classes with LWJGL, mainly for loading .png’s since it does a lot of the work for me. The actual GUI components of AWT you can’t use, other than that it should be fine.

You have to be carefult when importing stuff from awt, since it might summon the evil awt thread. I remember there was a big thread at sun.java forums. I don’t know much about it, since I like to at least try to write everything myself.