Unifont? Who GNU
I have a problem, I need graphics, graphics for games, game graphics.
But I don’t want to store those graphics in the games, they take up too much space. I’m working on a project were games are supposed to fit into a QR code, that’s around 3 kB. Super Mario Bros. graphics take up 8kB! and that’s too much. In this case I think I need to prioritise code and level data, which means no graphics in the QR code.
So where are the graphics? I’ll have to put them in the engine; a predefined set of graphics, shared between all games on the platform. When a game wants to use a sprite it can just reference its index.
But how does one create a set of graphics able to represent a variety of games? I want to support all kinds of 2D games, both top-down and side-scroller. There is one place I know where anyone can get thousands of sprites: Emoji.
🤣😍🥰😍😌😫👨🦱👱♂️🎐🎍🎁🎨🧂🥡🍟🍖🧀🍟
They show a wide variety of objects and concepts - which fits my criteria - but they are also too visually noisy to be used to build levels, and they have a modern social media aesthetic which I don’t like.
So what if we combined something old with something new: the aesthetics of ASCII art, with the large character set of Unicode (and all its emoji)?
That’s where Unifont comes in, Unifont is an effort to create a 16x16 pixel font that includes all of Unicode, and its open source too!
After a bit of Python-ing, I can extract the characters from the format the Unifont uses, and with some more Python-ing I can export the characters I want into an atlas.
Atlas of characters extracted from Unifont
There are still some glitches to work out, Unifont uses half width for some characters so I’ll need to stretch those or replace them. But otherwise it’s a pretty good selection and I think I’ll be moving forward with this as the basis for graphics in this project.
Another cool advantage of using text characters for graphics is that - when scripting - you can simply refer to them directly. To create a pizza sprite just type in the pizza emoji, it’s great.