I know that I am personally using Java2D because I want to make a game that does not need any extra libraries. Sure its not too bad to add extra jars, but having natives gets a bit annoying. I tried using LWJGL and kept getting UnsatisfiedLinkErrors claiming wrong ELF type. No such thing with Java2D. Sure the Java2D api is a bit annoying, but all it takes is a little wrapper class (i.e. a Sprite class) and you never have to worry about it again. The main concern, and the one why I am considering switching to LibGDX is performance with a bunch of rotated images. It works nice and smoothly until I had 10 simultaneously rotating images, then it just started stuttering.
In my opinion Java2d is for quick development, prototyping, tile-based games and everything with mostly static graphics without advanced graphical effects.
Something like LibGDX streamlines the process for you. They have a GUI tool where you select the folder to save your Eclipse project, and then when you open it in Eclipse it “Just Works.”
Anyways… It’s your funeral. At the end of the day, almost everybody who is serious about game development and has given both Java2D and LibGDX a try will not prefer to use Java2D. Not only is it less performant and more verbose, but it ports to less platforms and includes zero utilities that almost all games will need (game loops, GUI, input polling, bitmap fonts, asset management, texture atlases, animated sprites, particles, physics, tiled maps, or whatever).
libgdx handles native loading for you, so you’ll never have to deal with it. libgdx can display 50,000+ rotating sprites at 60fps on an average desktop computer – your code must have been doing something terrible, such as loading a new image each frame.
It doesn’t hog that much as far as I’ve seen. Almost everything I’ve ever programmed runs on 10mb of RAM or less and the one thing, a game, that I’ve programmed that runs on more only uses up to 30mb of RAM.
For that, I was talking about LWJGL. Also, I wasn’t talking about coding. When I use Eclipse, it always just worked because I could specify the native location. I was talking about when I exported my game and tried to run it elsewhere. I have not made a game yet in LibGDX, so I don’t know how well one export transfers from one platform to another, but with LWJGL, I exported my game under Windows and when I tried to run it under Linux, it spat out that error.
This is shit you need to know about. You need to know how to do this. If stuff like this gets in your way and you just give up on it despite fairly plain evidence that it’s solvable in the form of all those other games out there that have got it working then you’re possibly not going to be of the right mindset to be a developer in the first place. Maybe I’m reading too much into this.
…dang princec all swarin and sheet but yeah it is kinda basic and not very hard to deal with. I will be honest, I have never setup libgdx without the gui setup program doing everything for me. Does that make me a huge noob? Probably.
Java2D is slow but not 10 images being rotated slow. You have to be doing something horribly wrong. Instead, just drop j2d and move on to the future, libgdx.
I mean, it’s not like I just gave up. I finished the game. I just decided that since I am doing mostly 2D development, I would give Java2D a try for my new game.
To be fair, my definition of slow is fairly strict. My game was getting ~50fps as opposed to the intended ~60fps. With a bit of optimization, I could have gotten over it. Also, the problem was not low fps, it was stuttering due to a game loop that did not react well to a fps decrease. I would simulate constant updates by sometimes updating/ticking multiple times before rendering. If I just separated out game logic from rendering, my problems would go away (for now).