I think we’ve touched on this in our news posts, but perhaps a little more explanation would be good. As I mentioned in my previous post, our code really started from my early attempts to learn OpenGL. While we did some refactoring as we went, the code is not structured well. For example, when I was starting out and I just wanted to see if I could draw a triangle on the screen or if I could actually load a heightmap, I didn’t create a vector class. That just makes for a lot of ugly and duplicated code. A ship is a class that has a “draw()” method with a bunch of OpenGL code, and a few float members for the position, rotation, and speed. A city is similar. It has a “draw()” method with OpenGL code, and members for position and rotation.
It seems like pushing some of that into something like an “Entity” class would have made sense. Also, the way all the raw OpenGL code in methods worked was pretty ugly. Some objects changed the render state in order to achieve a certain effect. As a result, the order things get drawn is very important. All of that works fine if you just want to see if something will show up on the screen, but all of the interdependencies make it really hard to maintain and add new functionality.
Anyway, that’s the kind of thing that made us decide to rewrite from the ground up. We are writing an engine separately in order to force the separation of game logic from the framework code. A lot of our ideas are driven off of Game Coding Complete by Mike McShaffry. We are trying to use existing open-source libraries as much as possible. We could just using an existing game engine, but it seems like this approach is a good mix of our desire to get a good game working and our desire to learn and try out some ideas.
We are making progress on the rewrite, and I think our new foundation will be much more manageable than what we have now. Look for more updates as we make further progress.