“Fontémon” — An Entire Font Game Inside of a Font

Pixel art genius Michael Mulet has constructed a game that exists entirely within a single Open Type font file. Harnessing the power of ligatures, he’s created a choose-your-own-adventure-style turn-based game that pokes fun at both Pokémon and various typeface names.

After choosing between Papyromaniac, Verdanta, or Proggito, you’ll face off against enemies like Helvetikhan and Scourier (click link below to play the game).

https://www.coderelay.io/fontemon.html#player

How big of a game can you make in a font?

Fontemon has

  • 4696 individual frames
  • 2782 frames in its longest path
  • 131 branches from 43 distinct choices
  • 314 sprites
  • 1085 words of text

But, just how much content can you fit, if you push it to the limit?

  • Max: 2^16 frames (65536)
  • Max: Longest path ~3277 frames
  • Max: Branches are a bit more complicated.
  • Max: 2^16 (65536) sprites
  • Max: No specific limit on words, but other limits (frames, and sprites) apply

Of all of those, I really want to talk about #2 Max: Longest path ~3277 frames. Every design decision I’ve made for this game:

  • How to draw the sprites (Type2Charstrings)
  • Which type of substitution to use (Ligature substitution)
  • How to handle branches (again, Ligature substitution)

was directly influenced by this limitation. In fact, of all of the limitations, this is the rate-limiting step. Almost all optimizations I’ve done, have been to push this number upwards.

It works like this . . .

https://github.com/mmulet/code-relay/blob/main/markdown/HowIDidIt.md

Interesting, interesting, but also . . .

https://www.coderelay.io/fontemon.html