Oh boy,
Okay, first books comments. Another decent book is Shawn kendall’s “Practical Java Game Programming”. i havent read over the 2D section, and Im biased as I wrote the networkign chapter, but all in all what i have read so far looks pretty good.
The pdegree of the writers is excellent-- it wqas written by a numerb fo teh computer game programming course instructors at Full Sail Real World Education.
Now, as to APIs and such. If you are doing 2D you have a few choices. You can use the FullScreen Exclusive Mode AWT API. That combined with porper use of active rendering, BufferStrategies and VolatileImages will give you good eprformance on WIndows. The problm there is that the Mac implementation of Full Screen Exclusive mdoe last trime I looked was horrible and terribly slow and the Linux implemenation, due to limits in X, isn’t a whole lot better.
If you are lookign for somethign more close paltform then what msot people do is use the OpenGL 3D API but draw all on one plane. If you loo ma round you may be able to find Sprite APIs already built ontop of OGL.
There are two primary OpenGL bindings for Java today, JOGL and LWJGL. JOGL is backed by Sun and is in the JSR process right now to become an official stadnard. Its biggest disadvantage is that it requires some AWT and if you are trying to slim your program down to its absolutel smallest footprint you might not want that. The other is LWJGL. It was written and is maintained by oen of our communtiy particpants here and is itneded to be the absoltue slimmest way to get from Java to OpenGL.
For controller input you want discovery (“what are my controlelrs”) and polled input. The JInput API, also available here, wil ldo that fro you on Mac, Windows and Linux. LWJGL has built in API for this. I understand the latest version actually uses JINput under the hood so there shouldnt be much difference outside of some syntax differences.
For audio again LWJGL providesi ts own, or you can use JOAL, which is the thrid “core” API available here and which ios a biding for Mac, Windows and Linux to the OpenAL audio system.
Thats basically what you need to cover for any game-- video, audio and input. Beyond that you get into the special needs of youir particualr design. As you get into your game and have questiosn abotu how to do tyhings Im sure we can help you with more specifics!
Good luck! Game programming is fun… just remember that its NOTHING like the programming you’ve done before. Game programming is soft real-time programmign and the techniques are totally different. As an example, forget everything you’ve learned about asynchronous events. In games you dont want em. If anything, itll be closest to your MSVC message-pump loop coding.