Share this project

Done

Share this project

Done
Put on a lizard and go for an adventure! A new game for Nintendo Entertainment System, PC, and Mac.
Put on a lizard and go for an adventure! A new game for Nintendo Entertainment System, PC, and Mac.
Put on a lizard and go for an adventure! A new game for Nintendo Entertainment System, PC, and Mac.
325 backers pledged CA$ 18,440 to help bring this project to life.

My lizard is the Lizard of Text

7 likes
Heep offers some friendly advice in the Void Zone.
Heep offers some friendly advice in the Void Zone.

In some of my previous updates I've mentioned how everything the NES shows you is either made of a grid of background tiles, or sprites.

In most cases, the best way to put words on the screen is with the background tiles. I mentioned in the update about scrolling how the tile grid rendering concept was borrowed from earlier computer graphics systems which used it specifically for text display, so it makes a very natural fit here.

Skewed sprite based text in Strider.
Skewed sprite based text in Strider.

You could technically use sprites for text, but there's only 64 hardware sprites, and they have an 8-per-line limit that is usually too much of an inconvenience. The ending to Strider (NES, 1989) bizarrely placed letters at a diagonal to avoid that per-line overlap, just so it could slide the sprite text over top of the ending's background.

Fonts

The font used for the Lizard alpha demo.
The font used for the Lizard alpha demo.

A few people have commented on Lizard's font, saying that they thought it was the font from some familiar game, but I made it from scratch! The truth is when you're only working with an 8x8 pixel box, there aren't that many degrees of freedom, and if you have a similar set of goals as another font maker you'll probably create some very similar characters. (For similar reasons, the application of copyright to fonts is a difficult subject.)

Lizard's letter Z, or "Zed", if you will.
Lizard's letter Z, or "Zed", if you will.

Something you may notice is that I have left an empty gutter of pixels on the top and right edge of every character. This is necessary, because the tiles are touching each other on the screen. It's an 8x8 tile but really you only have 7x7 pixels to draw each character.

The screen's tile grid displaying lines of text in Lizard.
The screen's tile grid displaying lines of text in Lizard.

One of my goals was that vertical strokes should be 2 pixels wide. This helps a little with legibility, because the NES signal is a bit fuzzy in the horizontal dimension; a lot of NES games did this in their fonts. It's not entirely necessary, though, and some games do have thinner fonts. Kirby's Adventure (1993) has an unusual thin italic alphabet with a secondary colour used for anti-alliasing.

Kirby's Adventure font sets.
Kirby's Adventure font sets.

You aren't necessarily stuck with 8x8 tiles, either. This double-height 8x16 font in The Young Indiana Jones Chronicles (1993) looks quite nice, though it also requires twice as many pattern tiles! It has both upper and lower cases, and check out that nice descender on the lower-case "g".

The Young Indiana Jones Chronicles had a double-height font.
The Young Indiana Jones Chronicles had a double-height font.

NES text is almost always monospaced, meaning that each character has exactly the same width. The grid of tiles leaves few practical ways to do anything else.

The Nintendo name on Dr. Mario's title screen is drawn as its own separate piece.
The Nintendo name on Dr. Mario's title screen is drawn as its own separate piece.

Often you will see on a title screen a couple of custom tiles used to draw one specific piece of text, like the Nintendo name on Dr. Mario's title screen. This is only effective for very small amounts of text, because it very quickly consumes space in your tile set.

One interesting solution to this is using RAM instead of ROM for background tiles, so you can render the text directly into RAM as needed. This can be seen in RHDE: Furniture Fight (2014).

Text rendered directly to tile RAM in RHDE: Furniture Fight.
Text rendered directly to tile RAM in RHDE: Furniture Fight.

The downside of this is that even with the ability to render new background tiles on the fly, there's still a rather limited number of them available to the NES, so this technique can only cover a limited portion of the screen. Compare this with a simple monospaced A-Z alphabet, which only takes up 26 tiles in the set, but you can use them to cover the whole screen in text!

Language

So far my examples have been of English text, but the NES is a Japanese machine. How does the Japanese language work with these limitations?

A screen from Metal Slader Glory.
A screen from Metal Slader Glory.

Metal Slader Glory (1991) represents what I think is the ideal Japanese text system on the NES. First take a look at its font set:

Metal Slader Glory's extensive font tile set.
Metal Slader Glory's extensive font tile set.

This is incredible! Nearly 250 tiles just for text! A large collection of punctuation, a set of numerals, a capital Latin alphabet, both syllabic Japanese alphabets (Hiragana and Katakana), and even about 70 common Kanji! If you're not familiar with Japanese writing, don't worry about these terms, I'm just trying to get across how different the font needs for other languages can get.

Metal Slader Glory is a visual novel game, so text might be its most important feature. It's also a relatively late NES game using Nintendo's most expensive expansion controller in its cartridge, which helped a lot. The text appears on a separate part of the screen, and this hardware allows it to switch tilesets just for that area, permitting full use of the 256 NES background tiles!

Text in Metal Slader Glory uses a full row of tiles for spacing between each line of text.
Text in Metal Slader Glory uses a full row of tiles for spacing between each line of text.

 

Another thing you might notice is that there's actually a gap between each line. This serves two purposes: first, the spacing allows full vertical use of the tile, 7x8 pixels instead of 7x7, which might sound like a small difference but is a huge advantage for legibility of Japanese characters. The second purpose is that Japanese has modifying diacritic or "accent" marks that appear at the top right of a character to indicate a different sound. With the empty line gutter, these can easily be placed as separate tiles above the text.

In Dracula II, diacritic markings are placed in-line with the text instead of above it.
In Dracula II, diacritic markings are placed in-line with the text instead of above it.

Here is some text from the original Japanese version of Castlevania II, known in Japan as Dracula II (ドラキュラII 呪いの封印, 1987). Despite having double-spaced lines, it places diacritic marks in-line with the text. As well, it uses 7x7 characters, as if it had originally been planned for single-spaced lines, and even uses 2-pixel thick vertical lines! All of this contributes to a poorer quality, less legible text compared to Metal Slader Glory.

The font set for Dracula II.
The font set for Dracula II.

Dracula II also has to fit the graphics for the town at the same time as all the text characters. Instead of 3+ alphabets, this game only has one. Many words that should normally appear in a different alphabet are instead forced to use another.

Dracula II's "name registration" page uses Japanese words presented with Latin characters.
Dracula II's "name registration" page uses Japanese words presented with Latin characters.

Even worse, on the game's Name Registration page, the Japanese words have been rewritten with the Latin alphabet! This seems to be slightly desperate, perhaps trying to accommodate all the unique graphics of the title screen in the same loaded set. (This was a game for the Famicom Disk System, and could not switch tiles without lengthy disk load times.)

The prologue in Dracula II appears entirely in English, despite being a Japanese release.
The prologue in Dracula II appears entirely in English, despite being a Japanese release.

...and the game's introductory prologue, also adjacent to its title screen, appears entirely in English! This is perhaps the final level of degradation from the ideal we saw in Metal Slader Glory. It's incredibly common, however, to find Japanese games with some, or often entirely English text. The reasons why are many and complicated, but here's a few hints:

  • Basic English knowledge is common in Japan.
  • It won't require translation for international release, where English is the most widely known target language.
  • Full understanding of the game's text may not be critical to playing it.
  • It may be redundantly explained in Japanese in the printed instruction manual.
  • One basic Japanese alphabet requires about 50 characters, but English requires more like 30; very important when your tile budget is tight!
Dracula II compared with Castlevania II: English words and sentences typically require more letters than equivalent Japanese ones.
Dracula II compared with Castlevania II: English words and sentences typically require more letters than equivalent Japanese ones.

Another funny thing is that when the game was brought to the English speaking market, the double-spacing was retained. One of the tradeoffs for the larger Japanese alphabet is that similar ideas tend to take fewer characters to express; English words and sentences are longer! Compare these two boxes, which express more or less the same idea, and think about how cramped that space must have felt when trying to prepare the English text.

A Finnish fan-translation of Castlevania II reclaims the double-spacing of lines to give more room for its text.
A Finnish fan-translation of Castlevania II reclaims the double-spacing of lines to give more room for its text.

This more recent fan translation of Castlevania II into Finnish rewrote the text system to eliminate the double-spacing, and was allowed much more room to write better prose. (There is also an English re-translation using the same revised system, and also has an option for a number of other gameplay improvements.)

For further reading, I highly recommend: Legends of Localization

This website has many interesting articles about these topics, including one about Castlevania II: Legends of Localization: Castlevania II

Localization

So, aside from just the problem of different alphabets and conventions for text, there is the matter of translating the ideas of the text from one language to another... but on a broader level there is the task of localization, which isn't just translating but also replacing ideas that won't mean the same things when you show them to someone with a different cultural background. It is changing the game to suit a different audience.

The giant floating head of the Abarenbou Tengu compared with Zombie Nation's Zombie Samurai.
The giant floating head of the Abarenbou Tengu compared with Zombie Nation's Zombie Samurai.

When Abarenbou Tengu (暴れん坊天狗, 1990) was localized in the west as Zombie Nation (1991), the titular character was changed from the Tengu, a well known mythical creature in Japan, to some kind of Zombie Samurai. Most North Americans probably wouldn't know what a Tengu is, but presumably it was felt that the Zombie Samurai would hold some appeal here?

Localization can take many forms. Characters may change names and faces, or be replaced entirely. Blaster Master's charming introduction about a boy chasing his pet frog down a hole is entirely absent from the original Japanese Chou Wakusei Senki Metafight (超惑星戦記メタファイト, 1988).

Blaster Master had an introduction not seen in its Japanese counterpart.
Blaster Master had an introduction not seen in its Japanese counterpart.

Because Localized versions often came later, sometimes after testing the market in the first region of release, other changes might be made just in an attempt to improve the game: fixing things that seemed too difficult or broken, or finishing things that had been rushed. The Japanese version of the arcade game Strider (1989) was delayed by a few months, allowing its composer enough time to add more music to the game for that region:

.

These days refinements like this can often be delivered as a downloadable patch, but before this was possible the localization step was frequently taken advantage of for more general improvement.

Preparation

Even if you have the people and resources to localize your game's content, this is something you have to plan for in advance at a technological level. You must structure your game's systems to be flexible enough to accept these changes.

Rule #1: Put all your text in one place, and never mix text content with code.

Mixing strings with code can be treacherous.
Mixing strings with code can be treacherous.

It often seems convenient to put text strings directly in the source code where you're going to use them. This makes some sense, because a lot of what you want to do with that text is going to be tied up in that code anyway, but as you want to start translating this will quickly become a nightmare!

Gather up all that text and put it in one place. Put up an interface layer of code between the text and everything else, and make all use of text go through it. If it's centralized, it will be much easier for a translator to see how it all the pieces of text relate to each other, and you can even build tools to organize and work with your text!

Rule #2: Leave extra space in your font set. Leave a lot of extra space.

English needs fewer characters than most languages. Its alphabet has only 26 letters, if you want to limit yourself to just one case. It has some other characters that are rarely used, such as in borrowed words like "naïve", but even those can usually be omitted without loss of integrity. Most other languages based on the Latin alphabet have accents and other diacritic markings that are more essential than they are in English, so additional characters will be necessary.

In the examples of Japanese above, though, we could see though that more than 50 characters is barely adequate! Its in a different ballpark altogether. Some languages are going to be more difficult than others to budget font space for, but you'll have the hardest time of all if you only budget for English.

This rule in particular is the most difficult to pull off on the NES. Font space is a very finite resource on this machine.

Rule #3: Make sure your text tools support unicode.

This is a followup to rule #1, but you'll need to make sure your tools let you work with characters from the langauges you need to support. Your game itself might only be able to deal with 8-bit character data, but remember your text is separated from the game. The source format of the text should be unicode, and your text processing tools should convert to the eventual data format needed by the game. With unicode tools you can accomodate editing in a lot of different languages directly.

When you have the whole set of text separate, and represented as it should look rather than the final form, its much easier to make changes. If you decide you don't have enough room in your font for Ö and want to replace it with OE, the conversion tool can do the work. You can even have it gather statistics like how many times you've used each letter, trying to spot the most important ones if you find yourself having to weigh a compromise.

.

There are a bunch of other suggestions I could make, like keeping text in graphic assets to a minimum (else you'll find yourself redrawing them for each translation), and to try to design flexible layout systems to accommodate different lengths of text and languages that might want right-to-left or some other orientation of lettering, or various awkward differences about how word-wrapping works...

This is a pretty big topic and I don't really want to try to comprehensively cover it. The most important thing is rule #1 though; if you do one thing, do that. Separate the text content from everything else so that you can manage it.

My lizard is the Lizard of Text

When I started Lizard, I did try to follow these rules, but over time I gradually failed them in small ways here and there. More recently I have been able to pull it back into good shape for potential localization, though. It took more effort than I thought, because I didn't realize just how many times I'd slipped, but because I had a least tried to follow rule #1 from the beginning I could still manage to retain this possibility!

My original goal for the game was to have no text at all, but this changed when I decided that the Lizard of Knowledge should be able to read and talk to things. Over time I thought of more uses for text, and at this point, though I don't think any of the text is critical to the game, there is a fair amount of it sprinkled around.

Text is a very space-efficient way to fit interesting content into a game, so it's a pretty effective tool to have. Communicating an idea with text takes a lot less data than trying to do it through pictures and animation. Text-heavy genres like RPGs take full advantage of this.

Originally my plan was to attempt translation only on the PC version, where I could simulate some sort of "special" hardware that my NES cart wouldn't have for extra characters. At that point I did not consider it worthwhile to even attempt to do it on the NES version.

After the demo, I decided to double the ROM size, and this really changed what was possible! At the time I was struggling to fit all the graphics I wanted into the space I had, so the idea of fitting any more characters into that font was a bit out of the question.

Lizard's current font set, with several tiles freed up for use by other languages.
Lizard's current font set, with several tiles freed up for use by other languages.

Now that the game is almost finished, though, I took a long look at all the text in my game, and I was at first going to implement the planned "PC only" translation system, but as I started to work on that I found I didn't like they way that worked. I realized I had enough wiggle-room to push the font characters around. I moved every non-essential character out of that font set page!

So... now there's room for 11 extra characters, and an option to replace the A-Z alphabet and punctuation too if needed. So... I can fit 45 custom characters here. Unfortunately, this is probably not quite enough for Japanese (すみません!), but it should be enough for many languages, at least. I can't really make any more room here without a bigger redesign of the game, and it's far too late for that.

.

Aside from making room in the font set, I hadn't actually entirely stuck to rule #1. When my ROM size was smaller, I had to break it up into pieces to fit in various ROM banks (see my update about space for an explanation), and I also even had a few places where I had snuck a piece of text directly into the code.

It was a straightforward idea, but it took me a lot longer than I thought it would to track down and consolidate all the pieces of text and systems that used them. Originally I thought all pieces of text would take up an entire line on the screen, so that was all the text system could do. Later I wanted the scrolling credits, and the readable monoliths, and things that talk, and all of these unfortunately had their own separate code. At the time, each one just seemed like a small addition that wouldn't be used much, but in the end all of this together made for a lot of work disentangling it!

Now everything's unified. All the text is in one big table. Everything is stored the same way. Much easier to deal with!

Kind of a funny goal was that I had originally wanted the text to be valid ASCII encoding so that curious people might find it sitting in the ROM if they went digging around with a hex editor. This goal is achieved, though-- I did keep the A-Z alphabet in its ASCII position at least, so you should be able to do this if you want... but this won't work quite as well for anything using custom characters.

A while ago I was on a mission to finally beat Battletoads (1991), and as I played the game I was really surprised to find that the text between levels had many versions. They made it randomly select different text so you could still keep seeing new dialogue for a long time! I thought this was really cool and wanted to extract it all. With a hex editor I found that a bunch of short text was there in plain ASCII, but not these longer dialogues, which turned out to have their own separate system. I spent some time reverse engineering how they were stored and wrote a decompressor so that I could read for myself all the text in the game. I wasn't sure what to do with it after, so I connected it to two twitter bots for Professor T. Bird and the Dark Queen.

.

Returning from that digression: once I had all my text consolidated, I needed to work out a better tool for getting text into the game. One of the hassles what that I just had it all stored as C++ strings for the PC version, and assembly style strings in the NES version, and I was hand-converting between the two to make changes. It'd be a lot easier if there was just one source version, and the text data was just packed into the game automatically... so I did that.

A few lines from Lizard's English text source.
A few lines from Lizard's English text source.

Now it's all in one UTF-8 text file. It has a simple syntax, which I wrote a Python program to process. Basically any good text editor can be used to easily edit the text (I personally like Notepad++), and the rest gets handled by the processing program.

This isn't too fancy, but it actually works great, and now that it's all in place, I've had a very easy time editing the text and making little tests for other languages with it.

If I was making and RPG or something with more advanced dialog, I think I would create a dedicated tool for that, but for this game a unicode text editor is actually plenty good enough! I've seen more than one professional game project put all their game text in a spreadsheet document, and this is probably more sensible than it sounds.

.

On the PC/Mac version, I can now add languages just by placing a generated file in a folder next to the game. On the NES, though, I need to replace the text that's there in the ROM.

If you're familiar with fan translations of emulated games, you've probable heard of IPS files before. These files can be used to overlay new data onto an old ROM. I've organized the text data layout in Lizard's NES ROM so that it's all in one contiguous block, which should make for a really clean patch.

.

If I'm lucky enough to be able to make another game after this one, I do have a lot of design plans for it, and I actually want to have a lot of text in it. I'd keep the main gameplay screens completely text free, and transition to a dedicated dialogue or menu screen instead. I'd most likely reserve at least 128 tiles for the font set right at the start, so I'd be able to accommodate a lot more. There's a lot of things I'd do differently right from the start if I was making a game with more of a focus on text!

What Now?

So... I did all this work to make localization of Lizard possible.

Unfortunately, though, I won't have any alternate language versions available at release. The only reason I've been able to make this game for the budget I have is that I don't have to pay myself; all I needed was living expenses. While I can read some of a few languages, I am fluent only in English, so I'm just not capable of doing this part myself.

I thought it was important to get the language system in order before the game ships, but whether or not it will ever be used is still up in the air. I haven't budgeted for translation, and I don't really know what languages would be worth taking that risk on at this point. (It's still very possible that Lizard will be a large financial loss for me.)

Sorry if that's a disappointing way to end this update, but that's the state of things. Translations may potentially be available after release, but they're not guaranteed, and of course this is why it was not a promised goal of this Kickstarter project.

.

There is another option, and I hate to ask, but... if any of you are interested in seeing Lizard in a particular language that you can write well in, and you're willing to donate your time towards a translation, I'd probably accept it. I can't offer any compensation for it at this point, other than your name in the translated credits and an extra digital key for the game. If this sounds like something you'd like to help with, just keep it in mind for now. When beta testing begins, I'll be ready then to discuss it with anyone who is interested.

The total text is relatively small as well, probably only about 1000 words, but there are various technical concerns, and some of it won't translate well either (like puns on the word "moose"), if that gives some idea of the scope of the task.

Otherwise, I'll release and see how it goes, and hire professional translation if/when that ever seems viable.

Current Status

So... what's left? I'm still working on the last two bosses. They got interrupted by this text adventure when I wanted one of them to say something and realized I needed to finish the language system before the game ships.

The game is pretty close to being done. I'll have the beta ready as soon as I can manage, but as usual I can't give a date for it yet. Sorry. I would really like to be able to, but it's too much of an unknown! Soon, though. Soon!

I am being watched.
I am being watched.

Being as close to finished as I am is pretty nerve-wracking. I want to share this thing so badly. (AAAAAAAAA!)

.

Finally I just want to offer congratulations to Andrew Reitano for finishing Super Russian Roulette! My own copy is on its way, and I'm very excited to see how it turned out.
http://www.kickstarter.com/projects/batslyadams/super-russian-roulette-a-new-party-game-for-the-ne

 

Carlos Noguera, Nathan Fulton, and 5 more people like this update.

Comments

Only backers can post comments. Log In
    1. Matt Lohkamp on June 29

      your writeups are always fascinating, you're hitting the mark perfectly for me in terms of lay knowledge vs heavy industry jargon.

    2. Carlos Noguera on June 29

      I'd happily assist in the translation to Spanish when you are ready. Syntactically and font-wise it should be pretty straightforward, with the only character that might need to be added would be the ñ, but depending on the dialogue you may not even need it.

      I also may be able to get someone to assist with a Portuguese translation.