AlienBlitz 3d: lighting, in-game font, textures

Lighting

I finally dropped the tests on making all lights dynamic because I can’t get some good vertex lights parameters and it makes lots of artefacts around borders.

It’s no big deal for current dynamic lights as they are usually small, move fast, and have a short life time. But for permanent lights it just doesn’t fell right.

But it made me change a few things with dynamic lights, and corrected some bugs, so that’s good.

I’ve completely changed again how lights are calculated to try to have more shadows and more colors(as I think it is what was looking good with dynamic lights). New light calculation looks better, and it is quicker than before (barely noticeable, but still better than the opposite) and uses a bit less memory/graphical memory.

In-game font

Current release of Alien Blitz uses a very specific font system (drawing text):

I’m quite please with this code as it’s working nicely and can handle accents and such , but it’s a pain to maintain.

This font is just used in-game, the UI is using LibGdx font system. So I decided to change the in-game font to LibGdx too. I didn’t expect this to be easy, but interfacing the LibGdx system into the current one was very easy, mainly because we used almost the same function calls structure.

So now all fonts are rendered using LibGdx:

Directly converted TTF font

Using Fairfax font, like the UI

Using 36px font, dynamically scaled (best results)

I was quite surprised to see that it was looking a lot better to use scaled 36px font rather than 12px font for small font.

The only downside is that I was rendering a few font elements to Pixmaps and LibGdx font cannot (and will not) do that… So I have to rewrite some code.

Textures

Some more work done on textures:

Wall textures have more contrast

Floor textures that had not been worked on before have been changed (less contrast)