Java 3D: Rubik’s Cube Game

Since I like 3D graphics so much, I've always wanted to program a 3D game from scratch. In the beginning of 2007 (can't remember exactly, silly brain!) I decided to try out Java 3D and create a Rubik's Cube solving game. I'm not very good at solving the cube in real life, I've only solved it a few times altogether but that doesn't mean I couldn't create a simple game about it.

So, I researched the ways one can do 3D in Java and found this library called LWJGL (Lightweight Java Game Library) which uses OpenGL to render 3D graphics. LWJGL is not a game engine, it just enables the developers to get access to 3D graphics, input and sound to write their own game code.

It can't say much about the experience writing the game with LWJGL since it was quite a long time ago and I don't remember the particulars any more (silly brain is silly again). I do remember that getting the whole thing up and running was not as hard as I imagined.

Download the source code and binaries (currently for Windows only) here: RubiksCube.zip (3 MB)

My new sim racing wheel – the Logitech G27

A picture of my girlfriend trying out the temporary racing setup - I moved our 40 inch TV to my desk to get a bigger and better in-game view.

I finally decided to upgrade my sim racing hardware and get myself a new racing wheel - the Logitech G27. It is a dramatic improvement over my previous (and first!) racing wheel, the Logitech Driving Force Pro, which I've been using for the past 5 years. For me, the most important improvements are the H shifter and the quietness of the wheel. When racing hard, the old wheel made quite a lot of noise, whereas the G27 is almost silent.

So far, I've tried rFactor, Live For Speed and Need For Speed SHIFT2 and the wheel works perfectly with the first two games and less great with NFS. The force feedback was just too heavy even when I turned down the effects in game. I guess I can get better results for NFS, if I care to take some time and fiddle with the settings.

In my opinion, this racing wheel is well worth the money!


WIP: Chevrolet Corvette C6 (version 2) – Update #1

Here are the first Work-In-Progress (WIP) screenshots of my new Corvette C6 model. I'm remodeling this car because I wanted to create the ZR-1 model and I wanted to add more detail to the previous model. So, I figured, it was easier to completely remodel the car from scratch rather than to modify the existing one.

(the screenshots are from Racer, except for the wireframe and interior shots)

In the end, I will make the standard Coupe, the slightly more powerful Grand Sport, the more powerful Z06 and the most powerful ZR-1. The details will include fully detachable parts (like the my Supra model already has), high quality interior etc. This car will be available for rFactor (1 and hopefully 2 as well) and perhaps for Racer too.

This cake is not a lie!

We received four crates of strawberries, and this is the result of some of them. Too bad the starwberry season is almost over, I didn't really notice it beginning even...

About my current programming project…

For about a year now, I've been working on a little cross-platform C++ library that would help put together 3D OpenGL games. I say a library, because I don't really want to make a game engine, I just want to keep common boilerplate code somewhere separate. I'm developing this library mainly for learning purposes, I do not intend to offer is as a actual game development library.

It all started when I bought two game programming related books - the Game Programming Gems and Game Coding Complete (3rd edition), which is an excellent and well-written book. The books gave me quite good understanding about what game programming is like and also provided many useful code snippets (such as the event system and hashed string from Game Coding Complete).

So far, I have managed to create a simple model viewer using my library. I've got OpenGL 3 functionality (I'm not using any fixed functionality... at least I try not to) as far as having a custom matrix stack, the renderer draw the scene into a frame buffer and display it on screen, I've just got diffuse and specular lighting working with GLSL shaders. I've also implemented a basic GUI system, which can draw images, buttons and text on screen and react to mouse input. There is also an in-game Quake-style console for sending commands to the application and a basic component based entity system that still needs a few quirks sorted out.

My library also supports Bitmap and TrueType fonts. I'm using the FreeType library for the TrueType fonts, and I'm just rendering the font glyphs to a texture during runtime (at initialization) to get pixel perfect fonts. If you are interested in the code, I might just make a post about it.

I'm currently only using a few 3rd party libraries including Boost, FreeType, GLEW, GLFW and GLM (which is an excellent math library by the way!). Probably some more libraries will be added later for sound and networking. At first I was using SDL for window creation and input polling, but then switched to GLFW, because it is more lightweight and more OpenGL oriented.

I've split the library into modules such as Core, Renderer, Input etc. so each module can be compiled into a separate DLL or linked statically to an executable (preferred way). I'm using Boost.Build as the build system, since I found it relatively easy to get started with. I might switch over to CMake at some point though, because it seems to be more popular and easier to use perhaps...

I will continue developing this library at least to a point where I can make a reasonable little 3D game with sound and networking... perhaps a pong sort of game. If you are also interested in game programing, I would definately recommend the books mentioned above and also theses sites: Game Development on StackExchange.com and GameDev.net.

Here are a few screenshots of the model viewer: