Codename “Tango”: A WYSIWIG interface builder for OpenGL apps

Here’s a screenshot of a side project I’ve been working on. It’s a WYSIWIG interface editor for OpenGL apps (soon to include HTML 5 and WebGL), which I’ve codenamed “Tango”.

Tango is intended to be used for making HUDs and menus for games, although I guess it could be used for making other kinds of apps. I haven’t decided whether to completely open source it, or just keep it to myself.

That screenshot looked a lot better when I took it. I’m kind of embarrassed about how spartan Tango’s interface is! The interface being edited in the middle of the screenshot is for an up and coming iPad game.

Anyway, Tango currently allows you to do a very limited number of things, but it does them fairly well. You can quickly build up interfaces with a combination of buttons, labels, switches, and images. You just drag out the size of the interface element you want with your mouse. You can move/scale/rotate/stretch things. To use the interface in a game, you just load the interface file, assign button callbacks, and call the draw function in your render loop.

So Tango sounds good, right? Yeah, uhhm, not really. It’s still incredibly buggy. There are a number of half-baked features I need to either finish or remove before I release any code to the public. For example, the font system does not currently support Truetype fonts, despite the fact that I have a perfectly good font rendering library just sitting there. Instead, the font system uses an implementation of “FluidFonts”, a kind of fixed-size bitmapped font file format. You need to create these font files using a windows tool — very tedious. The animation system supports keyframes, bezier-paths, timing curves, alpha variance, and per-frame function callbacks, but there’s no interface for it, so all that functionality is unavailable.

Also, I’ve gone with Lua as the scripting language, but I don’t think Lua is the right approach. I’m debating chucking Lua out and replacing it with JavaScript in combination with some kind of V8 JIT compiler, but I’m not even sure if this is possible. JS will certainly make it easier to support HTML5.

Tango has no undo support either; instead it simply makes a hidden backup of the file when you save. This backup system is useful, because the program crashes, frequently.

Still, please contact me if you want to try out an ad hoc, informally-specified, bug-ridden, slow implementation of one-eighth of the first version of Flash. Be good to know if there is any interest for this sort of thing.

New theme, new server

Shifted over to Slicehost. There aren’t really many decent personal blog themes on woothemes, so I’ve opted for a free one for now.

FTGLES Update (or, truetype fonts for OpenGL ES)

FTLGES on github:

FTGLES on iPod Touch

I’ve been working on a library called FTGLES, which is an open source truetype font rendering library for OpenGL ES 1.1. FTGLES is a port of FTGL, a library originally written by Henry Maddocks and a number of other contributors.

Earlier versions of the FTGLES library, originally hosted on googlecode, were horribly buggy. OpenGL ES is essentially a stripped down version of OpenGL. To get FTGL working on OpenGL ES, I had to rip out all the old OpenGL calls in FTGL and replace them with a sort of internal “glue” layer that maintained its own internal vertex, texture, and colour buffer arrays. Most of the nasty bugs were caused by the glue layer not restoring client states or buffer arrays properly, and I was repeatedly getting emails from people saying that seemingly unrelated feature x or feature y was crashing their app. I received a number of patches that kinda solved these problems, but they did not quite solve the problems in a way that would work for all users.

I’ve now gone through the library and fixed the these bugs. This updated version will properly restore all previous array and client states. I’ve removed the need to call ftglInitImmediateModeGL() before rendering your fonts. I’ve also added support for polygon font rendering.

Performance is slightly better on this update, but I’m still not quite happy with it. There are always significant performance constraints on mobile operating systems so it’s always going to be a fight to get decent performance. The library will render texture fonts without too much fuss, but polygon fonts should be used sparingly. Unfortunately, OpenGL ES does not allow pixels to be rendered directly to the framebuffer, so the ultra-fast FTPixmap type is still not available. I’m working on a separate type that mimics the behavior of this class by rendering glyphs to single texture, precalculating the glyph texture coordinates, and then using this single texture to render the font so glBindTexture(GL_TEXTURE_2D, handle) does not need to be called for each and every glyph.

The project has now been shifted to github, so if you are interested you should download/clone it from here. I should point out the contributions made by James Long, who did a great writeup on the library here. He re-instated the automake files, among other things, that I removed from the earlier googlecode version for some stupid reason.

The source code contains a number of demos for the iPhone. I’m hoping to provide demos for the iPad, but the most important thing now is to get a version working on the Android operating system. Here is a screenshot of one of the iPhone demos:

FTGLES screenshot on iPhone

A game I'm working on…

Here’s two gameplay trailers for a game I’m working on for the iPhone:

You can find out more about the game here.

Digital Painting

I’ve been doing some digital painting. If you don’t know what that means, “digital painting” is just painting using your computer, usually with a program like Photoshop and a tablet.

These particular paintings are depictions of characters in my upcoming game. I’m quite new to digital painting and there are still a few techniques I suck at. I still haven’t worked out how to do hair properly, and generally find ears to be impossible to get right. Despite this, I’m pretty happy with how it’s turning out. Check ‘em out:

There’s a great digital painting tutorial here, in case you’re interested in getting into this.

New Software Startup

The website is here.

We’re currently working on iPhone games.

And I really should post here more often…

Bloody hell

Too many video posts showing that I don’t really have a lot to say at the moment. I’m currently deep in a cocoon-like state working on an iPhone game after spending most of last year working for a startup here in Wellington.

On that note, Wellington dev Tim Haines has set up a database for iPhone devs around the world here. Add your name on this form.

Demoscene Vids

Couple of recent demo productions I was sent:

Dan Gilbert: Exploring the frontiers of happiness

I don't remember going to any drum 'n bass gigs like this

More here.