Request for guidance

Good evening,

I am an experienced Windows/DirectX/C++ programmer who moved to Linux/OpenGL/Java. Quite new on this terrain I do this request for guidance, hoping that you might lead the way.

Which API is best for input-devices?

Which API is best for sound-devices?

Which libraries should I use for quick 2d/3d-math-operations?

How are finished projects distributed? Jar?

Where can I find hints about java-code-optimization and performance-issues?

Please be so kind and provide me with catchwords, so I might deepen my research.

Good night and thanks in advance.

check out http://www.lwjgl.org for access to: Audio (OpenAL), Input, 3D graphics (OpenGL (which can be used for 2D graphics)). As for the math, I believe there are a few things in lwjgl for doing that sort of thing. You may also be interested in checking out JOGL, JOAL, and JInput if you are interested in seeing some alternative libraries.

Finished projects, thats sort of an in depth question, but the short answer is that you can use java webstart or an applet (depends on what your doing) or natively compile it, or use a native installer to hide the java stuff from your user and just let them interact with shortcuts.

Performance issues: read through some posts on the ‘Performance Tuning’ forum. If your worried about the garbage collector (seems like most people are afraid of that when considering java…) the key is to just not make tons of objects in every iteration of your main loop, theres no need to do it. There are also ways to tune the GC if it still ends up being a problem; you’ll find info on this in the forum I mentioned previously.

if you are just starting opengl as well, then check out http://www.nehe.gamedev.net and http://java-game-lib.sourceforge.net/wiki/tiki-index.php when you are ready to start using it with lwjgl (if you choose to use lwjgl that is, otherwise I’m sure there are jogl resources around).

As for learning java, get a good book on the basics and then google and the java documentation will be your best friend from there ;D

Good Luck!

Also: you have a lot to learn, don’t even bother looking into performance stuff until it becomes a problem for you.

Before you do anthing else, you should do The Java Tutorial(http://java.sun.com/docs/books/tutorial/index.html) from front to back. It will teach a lot about the language and its libraries.
LWJGL(http://www.lwjgl.org/) is specifically directed to game creation. It has graphics(OpenGL), sound(OpenAL), input(platform dependent) and timers and some other small utilities.

JOGL/JOAL/JInput is more general purpose. However, people have also made games with them.

Also don’t worry about optimizations until your program is running slow and you need them. Trying to second guess the compiler and the garbage collector can only lead to trouble.

Thank you very much for your kind replies.

Unfortunately I did not make clear that I am not a java-newbie. I am new into using java to create games.

Have a look at javax.vecmath. It’s part of Java3D. There is also a free third party implementation if your worried about licencing.