First standalone Dab game

24.11.2011 03:16 in dablang

Notice: I've created Dab blog. Most post will be mirrored here.


Few weeks passed since first release of Dab. I’ve been working on the codebase, refactoring a lot of code and adding static compilation (i.e. creating executable files). And finally I can introduce to you first standalone game written in Dab.

JIT Shooter is a project that I was using to create first usable version of Dab. And now you can download its .exe binary that doesn’t need Dab IDE.

Download JIT Shooter Standalone

However there are few issues:

  • you need OpenGL 3.2+ (to save additional functions calls shaders use explicit attrib locations)
  • you need MS C runtime 7.1 (you can get it here, game uses few functions like fopen/fread)
  • game uses STB image to load textures, those are compiled as DLL

But still, there is massive work ahead. I’ve removed few hacks just to add different hacks. However, next version (0.3) will feature proper handling of function pointers and few other modifications that will allow to reduce number of hard-coded tricks. Version 0.2 should happen in next few days.

BTW: I’m very happy with executable size. 39KB for playable native game is really not much. And with better loader (now all CRT/OpenGL calls are resolved in runtime very naively) it can be even smaller.

Other news: I’ve set up this blog as I’m not very happy with existing Dokuwiki site. I’ll probably experiment with wordpress wiki plugins instead.

I’ve also created Dab Google+ profile. Feel free to like+1!

TIL history of OpenGL error handling

08.11.2011 21:06 in opengl

Few months ago I've written a rant about OpenGL error handling. The bad news is that its debug capabilities haven't improved much since. The good news is that now I know the history behind this completly insane interface.

In late '70, there was a computer called TRS-80 (from Wikipedia):

Level I Basic was based on Li-Chen Wang's free Tiny BASIC, additional functions added by Radio Shack.[8] It achieved a measure of noteworthiness due in large part to its outstanding manual,[5] written by David Lien, which presented lessons on programming with text and humorous graphics, making the subjects very easy to understand. It had only two string variables (A$ and B$), 26 numeric variables (A - Z) and one array, A(). Code for functions like SIN(), COS() and TAN() was not included in ROM but printed at the end of the book. The only error messages were: "WHAT?" for syntax errors, "HOW?" for arithmetic errors such as division by zero, and "SORRY" for out of memory errors.

Rings a bell?