Patron only: stage 2 prototype (Patreon)
Content
You'll immediately notice that it doesn't look very different from the stage 1 prototype. It has a new "cover page" idea, and the class it uses is the Monk rather than the Sorcerer, but otherwise it's very familiar.
However, a lot has changed under the hood. This version is built out of 50 separate files, but gets inlined into just one file. Not just CSS, but fonts and images are all inlined as data URLs. The result is a single 617kB HTML file with no external links at all.
This has exposed a few things that I need to keep in mind.
Fonts are huge
Fonts contain shapes for many, many different characters. To handle all the different languages out there, that means a lot of repetition, because e, é, è, ê and ë are all separate glyphs. You don't notice the size of a font when it's just sitting on your desktop PC, but file size on the internet is on a different scale. And while it would be easy to dismiss that, I'd prefer not to. There are people in the world for whom fast, reliable internet is not a given, and those people deserve Dungeons & Dragons too.
That's why font subsetting was invented. If you know you're only going to use a small number of the shapes in a font - such as the ones used to write English - then you can cut the font down to just those letters and save 90% or more of your file size. The flip-side is that, if you then try to use that smaller font to write Polish or Russian, it won't work.
The character sheet file embeds all its fonts. To keep the file size from being insanely big, I had to pick out the exact fonts I need and, more importantly, pick a limited subset. That works for this prototype, but it's going to be more complicated for the real thing because other languages do need to be supported. So I'll need to keep multiple copies of each font, and pick one when it generates a character sheet.
Similarly, I'll need to keep track of which images and icons are used in a given character sheet rather than just including all of them.
I need to rethink flexible layouts
The layout in the first and second prototypes resembles that of my previous character sheets, with pages designed for an exact layout. Sadly, that approach gets increasingly complicated as the contents of the pages become variable. It was complicated enough when page size could be A4 or US Letter.
In future stages, I'm going to have to accept that some or all pages in the character sheet are laid out flexibly. If not, some bits of it end up getting much too stretched out.
Monks are dull
To be precise, the Monk class in the playtest has very few features. It's one of the few classes without a specialisation of some sort, compared to the Sorcerer's bloodline, the Cleric's domain etc.