top of page
Search

[104-105] Narrowing

  • Writer: Conlan Walker
    Conlan Walker
  • Nov 17, 2023
  • 1 min read

I've started learning C++. It's been going along without all that much issue, likely in part because I already know C. The first thing I've done is make a new bitmap font system in it, with some cool features!


Here's the current list of chars (which are technically in a custom encoding :D)

Chars 16 to 32 are used for gradients, using a kind of ordered dithering.

ree


Here's a demo of something that uses the gradient chars mentioned earlier, in the form of a spinning cube.







(I'm not actually doing real-time rendering here, as it just uses a pre-rendered animation lol.)

ree


Here's an example of the font actually being used for text:

ree


The text actually has 2 palettes of 16 colors, but the text should always be at least slightly different from the background, so that text can be readable even if the background and text has the same palette index: (it took a full day to make this palette)

ree


And here's an example of all of the chars and all of the colors being in use at once:

ree


Now for the more boring stuff.

These 2 were notes for making some of the font, which was tedious because I had to effectively type in each individual bit of the font's first 31 chars by hand:




The next 2 are the lookup tables that the font uses for its font data and palette respectively.





The rest is just the code that makes it all work:







 
 
 

Comments


bottom of page