LWJGL

Sprite animations can be rendered in various ways. More commonly used techniques use 2D textures and discretely display one frame at a time (for example on a quad). This is usually done by loading each frame of the animation into a seperate 2D texture and binding them as required, or by putting all frames into a single 2D texture and moving texture coordinates. Smooth animations require a high number of frames this way.

Alternatively, you can use a 3D texture, which gives you linear filtering between frames, i.e. frames are blended into each other. A 3D texture can increase visual quality and create smooth animations with fewer frames. The following describes the idea and shows a few examples.

Phys2D and JBox2D are 2D physics engines written in Java. Both are mainly intended to be used in games for increased realism. They simulate the physical interaction of geometric bodies like boxes, circles and simple polygons. Phys2D has been written by the author of the 2D games development library Slick. JBox2D is a Java-port of the C++ physics engine Box2D.

Since both offer very similar features, I took a closer look at them. Questions that interested me most were: How much performance do these physics engines cost? How do they compare to each other performance-wise? Which is easier to use?

The GlGetQuerier is a small utility to query the current OpenGL state with all constants that are listed in http://www.opengl.org/sdk/docs/man/xhtml/glGet.xml. Returned results are printed to the console. Writing them to a file is optional. A packaged version (from 2008-10-29) of glGet.xml is used to compile a list of constant names. Values that require glGetString (not in glGet.xml) are also queried. The output is sorted alphabetically by the constants' names.

GlGetQuerier is written in Java 5 and uses the LWJGL 2 for OpenGL access.

"The Lightweight Java Game Library (LWJGL) [...] provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library) [...]"
- The LWJGL homepage

In order to use OpenGL in Java wrappers, like the Lightweight Java Gaming Library (LWJGL), you obviously have to learn how to use both first. The de facto standard beginner book for OpenGL is the Redbook, the OpenGL Programming Guide. However, its examples are written in C. While I was learning from the book, I implemented its examples with the LWJGL in Java. These rewritten and ported examples are published here.