1. icon for News
  2. icon for TCHOW

News

Wednesday, April 24, 2013

Making The Worst Case Less Ugly

Nearly everything you see in Rktcr -- sprites, fonts, backgrounds -- is vector-based. Sprites begin life as marked-up SVGs, and are meshed by some tricky planar-map code, then stored as triangle lists; fonts are the same (as I posted about previously); and backgrounds are procedurally generated meshes.

What this means is that without some decent antialiasing or a high-resolution screen, things can go horribly wrong -- lots of jaggies and illegible fonts. My solution to this problem was to add code that "bakes" meshes to textures (this code is only used when antialiasing isn't available). It isn't perfect, but it does make 800x600 a more pleasant playable resolution.

The Results (menu)

The left image has 16-sample antialiasing; this is how the game is meant to look. In the center, I show what the game looks like with meshes baked to textures -- it's a bit muddier, but still decent. On the right, I show what the game looks like without baking or antialiasing; pretty horrible.

The Results (lab)

You'll probably need to click on these images to see them large enough to judge the differences. The order is aa, baked meshes, no baking, as in the previous comparison. Some interface elements are not static meshes (e.g. the timer in the upper left) and -- as such -- remain jagged.