Going Native...

So, I've stumbled upon a slight problem while implementing my game's infrastructure, namely a lack of features in Java's standard implementation.

Looking for ways to solve the specific issue (related to detecting if the display has been rotated) I ended up delving into native interfaces.

Also, I've been looking into the JInput library in order to add gamepad support, and I'm also looking into how these libraries interface with the underlying system.

Java Native Interface (JNI) is probably something that will have most Java programmers running in a fit of terror, and I see why, but I'm rather intrigued by the possibilities, mostly because given my long-term portability goals (Moving the codebase to C++), understanding how the JVM communicates with the underlying system is crucial.

Also, I'm acquiring this habit of taking exiting pre-defined Java structures and stripping them of anything I don't really need, and will possibly end up doing this very same thing with native interfaces, if only to learn more, and have fun along the way.

As far as actual development goes, I'm mostly coding away at the infrastructure for screen and input management, so there isn't much to show for my work. Once this step is done, I should be able to take any Java game and, with minimal tinkering, plug it into my system.

No comments:

Post a Comment