Java Help

Soldato
Joined
22 Oct 2005
Posts
2,855
Location
Moving...
I'm looking for either a book or online tutorial into drawing and handling graphics in Java (2D and maybe a little bit of 3D). It needs to cover the basics becauses I'm a bit of a noob :o.
I've found lots of small tutorials online but they discuss only a small area of functionality or dont go into much detail. I think I would prefer to get a book if possible but i'm not sure whats out there, the only one i've found is Java 2D Graphics By Jonathan Knudsen but its not got the greatest reveiws.

Thanks for any advice.
 
Dj_Jestar said:
What, if any, specifics are you after?
Well its for my final year project at uni. I'm re-doing the moving map systems you see on planes (you know the map of where the plane is), but I dont know exactly what that will require, probably some kind of basic wireframe model and filling that with the appropriate terrain shade (i.e. green for sea-level going to yellow/brown at hight). It's going to be interactive, i.e. you can zoom/rotate camera (like google earth) so the main thing is the camera engine, hopefully actually drawing it wont be too hard, its the maths behind it that will.

Hope that clears it up a little bit :)
 
If you are planning on doing any 3D, then you should look at jogl (https://jogl.dev.java.net/) and do everything in openGL. Java3D is awful/complicated, so I would recommend you avoid it. OpenGL probably better than any native Java stuff for 2D drawing as well, if you want the map to move / zoom in and out etc etc.

JOGL basically just exposes the openGL interface to Java. GLUT (an openGL toolkit which is also exposed by JOGL) gives you a few nice routines for saying where the camera is, what it should be pointing at and what the perspective is etc etc.

As far as books go, if you choose to follow this route then the only book you would need is the openGL red book Chapters 1-5. The previous version together with all the example code can be found for free online: http://www.opengl.org/documentation/red_book/
 
2D would be "simple" enough. You'd only need to have a clip image of an aircraft (silhouette) or arrow, then just rotate it to the direction of the aircraft and move it according to it's coordinates. Or move the map around in the reverse and keep the aircraft stationary.
 
Back
Top Bottom