Howdy! I’m a fairly experienced C/C++ programmer, and I’ve made some simple game demos using openGL, but I’m currently writing a game for a college project using Java. I’ve done a lot of looking around for information on all the 50 billion different ways of making windows and drawing little bitmaps on them, and I’ve decided the following:
- AWT sucks, so I want to use only Swing instead.
- Swing automatically uses hardware accelerated backbuffers using volatileImage.
- I don’t want to use any external .dll files or classes.
- I don’t see any point using openGL for 2d if Java2D and Swing are just as fast.
- I want to use an application, not an applet.
- JFrame is the best container to use.
- compatibleImage is the best way to make hardware accelerated sprites.
So, what’d be a good framework? Would my main class extend JFrame, or could I include the JFrame as a private variable inside my main class? Where would I implement the event and keyboard listeners? And how do I load and draw compatibleImages?
In short, could somebody point me to either a good tutorial, or show me a good code snippet for a basic framework?
