In the beginning ...
A beginning is a very delicate thing ... or so Princess Irula tells us in Dune. I say the beginning is the least delicate thing. It's what comes right after the beginning that usually doesn't survive. I have plenty of beginnings. I begin over and over and over again. This is one of those many beginnings in 3D programming.
This time, I decided to venture into Java, for two reasons: first, I knew the language, and second, I knew the IDE (Eclipse). The fact they were both free didn't hurt, either. However, there is a distinct lack of expertise in Java multimedia or game programming.
I knew of the Java3D API by Sun, but because of the difference with "normal" , goold ol'e OpenGL, I had some difficulties wrapping my head around it. I found some half-ass tutorials, like on JavaWorld, but I didn't see how I could apply the event model and renderloop to a game.
Then I found Killer Programming in Java, which promised to teach my everything I needed for some seriously entertaining games. However, the author is forced to bend over backwards just to get something of a gameloop, where you update the gamestate first, and then render, and then evaluate your speed in order to calculate the frame rate. That's when I tossed Java3D.
The only serious alternative is OpenGL. Both Java and OpenGL promise platform independability, so they actually make a cute couple. They're not married yet, as their bindings still need to be fixed, but JOGL seems like a very mature effort.
And it was much easier to set up than I feared! There's a little magic going on because JOGL uses a few DLL's (or OS'es, or whatever your platform's solution for dynamic linking is), but thanks to a little magic with java.library.path, and some instructions from the JOGL forum, I managed to setup an example really quickly.
(stay tuned for exact instructions :-))
0 Comments:
Post a Comment
<< Home