Archive for September, 2008


Tuesday, September 30th, 2008

Danger Balls will soon be getting an audio-visual make-over thanks to contributions from some highly talented artistes. Alien Items will be sassing up the soundtrack with some atmospheric compositions, while O.K. Erok will be crafting some designer tanks for us. Yum yum!

Linux build released

Thursday, September 25th, 2008

Good news for nerds, cheapskates and stubborn people, as Danger Balls is now available for Linux! Continue to fight The Man by downloading your royalty-free, take-that-Bill copy here.


Thursday, September 18th, 2008

Not that you’d know, but this site now uses some very fancy blogging and feed parsing to provide your news updates. For the nerd that dwells within you that wants to exactly how: Wordpress provides an RSS feed and SimplePie parses the feed into HTML. Nerdtastic.

This will make adding news ridiculously easy, assuming this isn’t the last new thing that ever happens.


Thursday, September 4th, 2008

In the good old days, all XML for models in the Primate was hand-written. I took an evolutionary step recently by downloading an actual XML editor, rather than doing it all in Notepad.

Now, I’ve finally managed to build part of a model in Blender (that’s an actual model editor, people!) and export it to Primate XML.


I just had to run it through a couple of teensy weensy SED statements:

# Points
s/\([-0-9.]\+\) \([-0-9.]\+\) \([-0-9.]\+\),/<point x=”\1″ y=”\2″ z=”\3″\/>/

# Indexes
s/\([-0-9]\+\), \([-0-9]\+\), \([-0-9]\+\).*/<index>\1<\/index><index>\2<\/index><index>\3<\/index>/

Simple, eh? You’d do that in your sleep! It took me less than 2 hours to convert an object!

It doesn’t work properly, of course. Still, great days.

OpenGL transparency

Wednesday, September 3rd, 2008

You can’t have danger balls without explosions, and you can’t have explosions without transparency. I decided I’d have two types: transparency in textures - for billboarding pictures of dirt being thrown up in the air - and overall transparency of objects - for clouds of semi-transparent smoke.

A simple matter of enabling GL_BLEND, setting a blend function adding an alpha channel to texture images and setting alpha values on object colours…

But what’s this? OpenGL documentation saying there’s more to it…

“When using depth buffering in an application, you need to be careful about the order in which you render primitives. Fully opaque primitives need to be rendered first, followed by partially opaque primitives in back-to-front order. If you don’t render primitives in this order, the primitives, which would otherwise be visible through a partially opaque primitive, might lose the depth test entirely.”

You guys crack me up! How could something so basic necessitate such a contrived algorithm? This must just refer to mid-80s SGI hardware or something…

WAAAAAAAGH!! It’s true! If you don’t draw primitives in the right order it nobbles the whole thing! Come back, Java3D, all is forgiven! I promise I’ll use you in Primate 2.0!

Okay, okay, calm down. I can still use if for explosions, because they get added to the end of the draw list and only last a couple of seconds, so there shouldn’t be any transparencies overlapping. And what kind of a tank game would it be if there was more than one explosion at a time? Ha! I’d like to see that!!