Star Apocalypse is the reinvention of the 4X genre. The game is a real time game of intergalactic civilization, using the computation power of modern computers to run advanced simulations on cultural, technological and societal interaction and development.

Report RSS Delving into OpenGL

Recently, the first public version of the Combat Prototype has been released. This version still had various bugs. One of the biggest bugs encountered, was a bug which we couldn't fix. The bug was embedded into windows. We had to find a solution for that, and we did find it!

Posted by on

Hey there,

Recently, the first public version of the Combat Prototype has been released. This version still had various bugs. One of the biggest bugs encountered, was a bug which we couldn't fix. The bug was embedded into windows. It goes as follows:

If you make more than x calls of GDI+ per second, for a large amount of time, the GDI+ drawing buffer overflows, causing a CTD. Seeing that our combat prototype draws many GDI+ objects with a high frequency, for extended periods, we couldn't circumvent this problem. So we went to look for other solutions.

If we were going to move to a different drawing technique, we didn't want to be limited by things like XNA (we tried that before!). So what else was there that you could do? If we wanted to make the code easy to port across platforms, while still using C#, there were very little options. DirectX? No, that isn't cross platform. Well, for drawing, there was only one real option left: OpenGL. But we didn't have knowledge about openGL.

Finding the right stuff to use the strengths of OpenGL wasn't easy either. We tried Tao first, but it was so poorly documented, that it turned into a nightmare. Still, we managed to rewrite all the drawing code to OpenGL-bindings within 4 days with OpenToolkit. And that even includes learning all needed things to properly draw with openGL. Still, we can't declare the Combat Prototype bugfree. But using OpenGL is a big step forwards in development of the Combat Prototype. The download should be available soon!

Most likely, the eventual game will also use OpenGL + .NET 2.0. A mono port will be available, making the game suitable for linux, macs and other devices.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: