Spellcaster Studios

Make it happen…

Portability work

Work has been progressing lately, albeit not too fast…

Anyway, most of the work lately has been on the portability, since I want this game to come out for Windows, Mac and Linux… Problem with this is that the framework I’ve been using (the one from my 48-hour compos) wasn’t designed with portability in mind, so it demands I do a fair amount of refactoring…

Anyway, I’m taking it slowly, by steps…

First up, I removed my dependency on the D3DX library (except the shader compilation, more on this later)… For that, I reworked all the matrix code to use my own primitives (most of them taken from Spellbook), and I ported the text rendering code to FreeType 2… It’s a quite nifty library, and I use it to create a font atlas and I render the text using the normal “blitting” code of the engine.

screen88

The text now looks slightly different from the text under D3DX, but in some instances it looks better, so that part’s done.

After, since I want to port the game to OpenGL 3.2, I had to make it work in shader-only mode… So far, I was using only the fixed-function pipeline, but under OpenGL 3.2+ it doesn’t work (and to be fair, I like the flexibility of going for shaders in the future provides, for some eye-candy), so I have to make the game work only with shaders…

So I’m not tackling two tasks at the same time, I first did the migration from fixed-function pipeline to shaders (still in Direct3D 9), so the game is currently only using shaders for everything… Some things are a bit slower (due to the larger setup stage of rendering), but I can probably shave off some milliseconds from that and get it back to the same performance as before…

Below you can see a screenshot that looks almost identical to before, but now is fully shader driven!

screen89

So, the next step is probably getting OpenGL 3.2 working, which will no doubt carry its fair share of pain… I’ve never worked that much in OpenGL, so I only know the basics, but hopefully at the moment the rendering is abstracted enough to minimize the work…

I also have some new assets to put in the game, and that will lead to working on some new cutscenes, which will make for a nice distraction from the heavy load of work that’s incoming… But I can’t wait to see the game running under Linux and Mac… Will be very cool! Smile

So, until next time!

Comment