simple 2d api, multi-platform

This is probably so much a FAQ it hurts, but it would be great to have some feedback on my particular (peculiar?) requirements anyway.

I’m looking for some very simple way to add a GUI to my semi-complete turn-based strategy lib/engine. I already have some Android code, but I want to do things, possibly even distribute, for desktop as well, and supporting at least Mac, Linux, and Windows. It would be great to do this without requiring users to have java installed. I do not feel like depending on Oracle more than I have to. Since I only want very simple graphics (blitting bitmaps would be quite enough, font rendering a nice bonus) and no sound I guess there are a number of libs and alternative jvm implementations (or native-compilers like gcj) I could consider? Something with a nice open source license preferably.

It is perhaps best to keep it simple and just use the Oracle SDK for development anyway, but it would be nice to know that the lib I use can also be distributed without the Oracle-dependency the day I eventually might get around to distribute something? IIRC there are free implementations of AWT, so maybe even that is an option? But something more game-specific will probably save me some trouble anyway.

Assuming that I gamble on that people actually have a JRE installed or are willing and able to install one, what simple free minimal lib would you recommend in that case?

Take a look at libgdx, since it is multiplatform incl. android it may be exactly what you are looking for. Also slick is very popular here.

Thanks! I wasn’t intending to use the same ui code for Android and desktop, but maybe I will after all. But OpenGL would be complicating things too much in this case.

Maybe I’ll just make a tiny wrapper around Graphics2d for now for desktop, and see how it works out for now. At least then I have an easy way out if/when I find something better.

On a closer look libgdx did have some higher level 2d classes, so no need to do OpenGL. I might make my tiny wrapper around that lib instead then as a starting point. :slight_smile:

Edit: Oh, and slick too. I guess that is why they call it slick2d. Can’t believe how bad I am at reading text today. I had a quick look at both homepages first and got the impression they still required OpenGL coding, but now I see both are worth looking closer at.