If I was making a 2D game in Java, would using the default Graphics2D be fast enough? Would I get good FPS if it’s just 2D? (even if there is a good amount of sprites and other things going on)
Or when your doing any kind of game programming, 2d or 3d, should you opt for opengl/directx?
Also when you render stuff with Graphics2D, is it all rendered on the CPU? Or is it hardware accelerated?
You should use opengl/directx, or some java binding if you must use java (such as JMonkey). If you are new to game programming, I’d suggest using the XNA framework, as it simplifies a lot of things. I have used XNA, and it is fairly easy to use, and plug in different libraries. If you want a browser based game, javascript + HTML5 Canvas2d, or webgl may be the best route.
You will always get better performance out of using direct binding libraries over a 2D Graphics API type library. The main thing to do is make sure you know how images and textures are being stored / rendered, so you aren’t making the framework do extra work. Extra work will result in low FPS.