[quote]1.is it faster to use public variables from “subclasses” or get/set mutator/accessor methods to private variables?
[/quote]
Premature optimization is the root of all evil. I went through a phase like this and it made things much harder. Variable access will, 99% likely not be your slow-point and you’ll see no performance gain either way.
[quote]2.is it faster to deal with the byte’s of an image to edit it or to use say the Graphics class?
[/quote]
Dealing with the bytes has been faster in my experience, but it’s much more of a pain to use. When using Graphics, you have the nice methods to draw things and it can handle any type of image. When dealing with the actual data, you have to have ways of doing it handling all types of data and pixel formats.
Also, keep in mind that any changes to a BufferedImage will have to be sent to the graphics card, which is always a slower operation, too.
[quote]3.Does OpenGL know not to render things that aren’t in sight?
[/quote]
Yes, it gets clipped away so you don’t see it. But because you don’t see anything it’s best not to send it to the graphics card if you know its not showing. I’d look into “view frustum culling” to learn more.
[quote]4.How do you program for cross platform compatibility?
[/quote]
This I cannot answer so well, except to point out that whatever it is you’re reading, it’s very old. net.java.games.jogl is the old package name for JOGL before it became a official. You should not need to worry about choosing an NS or Cocoa implementation, jogl does this for you on Mac. These are just different windowing systems available on Mac.
[quote]5.Do I have to reprogram the whole game to have a Mac version a Windows version and a Linux version?
[/quote]
No, that’s the beauty of Java. It theoretically runs the same on the different platforms. I say theoretically because in rarer cases it doesn’t work that way. Program in such a way that each part is as separated as possible. If it turns out there’s a bug with some JVM or video card driver that you must support, you’ll have to change a small part of the code. You don’t want to change AI code to fix a bug with graphics.
[quote]6.Do different versions of java effect applets/applications a lot?
[/quote]
When you compile your code, the .class file has a minimum java version required to run it (e.g. if you compile with JDK 1.6, someone needs 1.6 to run it, too). Besides that, the newer java versions offer up syntactic changes with generics and annotations which won’t work on 1.4 or lower, and
they often improve performance.