A brand new game
for Windows, HTML5, 3DS Homebrew, iPhone, Android TV and more,
every week,
unless exhausted!
About Games Pixelart Music Poetry Home Patreon Mailbag Scores JNKPlat Levels
Bitmap Fonts
  30th October, 2017

Another basic task undertaken.


Adding the bitmap font wasn't the tricky part!
It uses the same font as the last Framework, although I did have to re-render the thing to make it work a little better with the new rules.

The harder part was..
A) I had to redo all the maths so that I can draw from 0 to 640 and 0 to "unknown Screen Ratio dependent value", instead of the basic OpenGL -1.0 to 1.0..
I'm not convinced that OpenGL likes having such a large scale, mind, so I'll be stress testing it as I go.

B) Having redone all the maths, I needed to once again stress test everything.
Oddly, I'm finding that OpenGL is happier scaling images up than it is down. Drawing hundreds of images results in a framerate drop after about 1,000 sprites onscreen, when images are drawn at less than 1.0x scale.
Contrary to that, I can typically get a nice flat 60fps with 2,500 sprites, when the smallest image is at 1.0x scale.
Something to remember.
I honestly imagined larger would be harder to render, but I guess not.

Although, of course, this is only Windows OpenGL. Other systems will need their own stress testing, and that'll come once I've managed to rewrite the main chunks of the code so that it CAN run on the other targets.

.. And I've not even dared to tackle Audio, yet. Eeek!!

Views 79, Upvotes 3
2018 Framework
Site credits : Jayenkai
(c) Jayenkai 2017 and onwards.
Blog - Bitmap Fonts - AGameAWeek