Monday, April 23, 2007

Font Rendering was rubbish

I used to use GDI for my in-game text. yeah Yeah, I know... it's sloooow and people say you should never call Lock() every frame on a surface, but its all nonsense. Thats how Democracy and Kudos worked, and they run fine.

But...

The problem is, you really can't go mad calling getDC() and Lock() when you use DirectX. doing it 4 times a frame is bad, doing it 10 times is BADDER.
I went to huge lengths to avoid this, but if you have GUI elements you can slide around, you can't render all your text at once, because some should be obscured by objects above (as with a windowed GUI).
So the GDI stuff had to go...
Actually, it's still in, and lots of Kudos-RockLegend uses GDI text. But the main screen, with all the overlapping icons, no longer does, purely for performance reasons.
I spent a lot of time improving the good old Starship Tycoon era Font Renderer, and it looks much better. it STILL doesn't look as sweet as GDI, but it's not bad.

So that's all done, and now I'm back in playtesting land. Just did a 5 year playthrough this morning, and I'll spend the afternoon improving, fixing and tweaking all the stuff I made notes on during the playthrough.
Can't be far off till I declare it in a beta state I reckon.