A Few NPC Updates

I’ve been busy making sure all my NPCs work well now that they can speak and things. I’ve added a new sprite animation for my frantically running panda character, so that he will actually stop and talk when the player chooses to interact with him, instead of continuing to run about. I’ve tried to make it look like he’s breathing heavily from all the running!


After the conversation is over, he continues running about. I’ve also placed Ji-sama into the first level, who is one of the two characters in this level who don’t give away any petals and are actually pretty pointless. If you happen to understand Japanese, he actually asks the question “have you found 5 petals?”


The final character I’ve placed in level one is a character called Renaldo. I originally based this character on Tsukimi from 51 Japanese Characters. Tsukimi is the act of moon watching– “tsuki” means moon and “mi” means watch. When it came to think up an original name for the character, I decided his name should be an homage to Renaldo Moon from Ghibli’s The Cat Returns (simply because his name has “moon” in it!). I recently decided that because Renaldo isn’t a particularly Japanese name, this character should be another English speaking character, who has also been thrown into this strange world and is just as confused. Renaldo however isn’t much of a man of action, and would rather watch and wait instead of rise against the strange problems occurring. I’ve placed him near the end of the first level, where the landscape is elevated and he can get a good view of what’s going on around him. Before you approach this character, he faces away, passively watching the world…


When you come within a certain distance of him, he will turn around. I’ve used the same font I’ve used for the menu when he speaks, so that he actually speaks in English, although he’s pretty useless in the end. The # symbol in strings of text represent a drop in the line, to make sure all the text fits neatly into the text box:



While Renaldo faces forwards, I’ve animated him to have a little smoke while he casually stands and watches. He’s just that cool.


I’ve been writing each character’s lines in an OpenOffice Writer document and pasting them into Game Maker as this way its easier to see what the text looks like in its proper Japanese form! And I can keep track of the English and Japanese romaji versions of what each character is saying, here’s a glimpse of the “script” so far… Please forgive typos and formatting errors as I put this together pretty quickly and well, you’re reading my Blog so you probably know how useless I am at typing and more importantly checking what I’ve written!

Wakarimasen…

I’ve been pretty unhappy with my old dialogue system for a while for two main reasons. The first is that it didn’t actually work very well. The best I could manage was a square to appear as the player passed by a non-playable character which contained the character’s “dialogue”, as I didn’t manage to figure out how to stop the player so that a proper dialogue situation could be initiated. The second reason I wasn’t happy with the system was that it was potentially detrimental to the game itself because it was fairly resource heavy.

The idea was to use a system where the player could get the gist of what NPCs had to say, but without the NPC using words. The reason for this is for the player to get the feel of language barriers faced by people in foreign countries. You can talk all you want, but it’s mostly gestures that will allow communication between two languages. This is why I had decided to use images instead of strings of text. A similar but less vague system is used in Machinarium. In this game developed by a Czech team, images and short move clips are used in speech/thought bubbles to depict dialogue. I’d imagine this was one of the keys to the game’s success abroad, because a minimal amount of translation would have been involved to export the game!



To make a system like this in game maker requires a lot of resources. I’d already made two simple “text box” objects that could be used universally throughout, but the content would have to unique for every instance. This requires a different sprite for each talking character, and some with several sub-images if the images scroll or are animated. This also takes a lot of my time as I was drawing new images for every time a character spoke! So I’d already decided that I would change the way this works, in the interest of my time and the performance and size of the game!

To help me really refine the system and create something that actually worked well, I went to the Game Maker Community forums and found a downloadable example similar to the one in this video.


The basics for a decent system are all here, including stopping the character when dialogue is initiated, scrolling text that progresses as if the character is talking and NPC interactions. I managed to adapt the code to create a very similar yet customised system so that when the player chooses to interact with a character, dialogue is initiated inside a text box and the player must sit through everything the character has to say before they can move on. I tested the system with a basic white text box and black text to make sure it ran smoothly.


The first thing I did after checking everything through was create a new larger text box sprite to replace the abominable white square I had made. I’ve made sure the box keeps the themes of the GUI and to make it similar to the previous text box, however I’ve flipped it over so that it always sits below the character who is talking. This way, it shouldn’t ever cover up anything important on the screen.



The next thing to change was the language. I figured instead of presenting the player with decipherable images, it would be even more convoluted to present them with a written language that they couldn’t understand. This is the real deal, as if they were really in a foreign country where everything that the people said was simply a jumble of sounds (or in this case letters!) The first complication with trying to achieve this is that it’s not easy to display the Japanese alphabet(s) in Game Maker. Although Windows comes equipped with fonts designed for displaying Japanese characters, Game Maker doesn’t seem to recognise the characters as letters. In the editor, the “unknown” box appears as a substitute, which is translated in the game as a series of question marks…


So I’ve had to think of a clever way around this. Instead of using the Japanese character glyphs from romanised typefaces, I’ve found this font which displays roman letters as Japanese characters. It’s actually a replica of the typeface used in the original GameBoy versions of the Pokemon games, which comes with English, katakana and hiragana versions. Unfortunately the letters don’t seem to be in any logical order, so I’ve had to spend some time working out which qwerty key results in which Hiragana character! For example:

& = は “ha”
% = な “na”
0 = み “mi”

So if I wanted to write “Hanami is Great”, I would do so like this:

English: Hanami is great
Japanese Romaji: hanami wa sugoi desu
Japanese Hiragana: はなみはすごいです
PokeFont: &%0 & 5c* d5

I’ve written some VERY basic lines of dialogue for each character, which I’m pretty confident in translating without too much worry. With the system I’m using, each character can have three lines of dialogue which are scrolled through by pressing X on the keyboard or A on the controller. The strings for the first character are written like this:


But in-game, they appear like this:


This is Bura-san saying hello! I will still need some indicators of the objectives of the game somewhere, however I’m considering using things like sign-posts instead of direction from non-playable characters. As I’ve mentioned before, in the first conversation with Bura-san the Zashiki Warashi character is also introduced. This currently involves the screen being covered with an overlay of the large Za-chan image I made before, so the game being set fairly well from the beginning now.


By the way “wakarimasen” means “I don’t understand”, which I thought would be an appropriate blog title 😛

Intelligent Thoughts


To begin designs for user interface, I’ve started up the style I want for graphical elements with these speech bubble text boxes. These simple square boxes are designed to float above the character speaking or thinking, and display mainly images depending on what it is that they need to communicate. The idea is to keep dialogue to a minimum- due to the communication problems associated with foreign languages. I was mainly inspired to use speech bubbles in this way by the anime short Cat Soup, which uses a lot of visual techniques to represent dialogue.


This isn’t the first time a similar technique has been used in a game. The hand-drawn Indie game Machinarium doesn’t have a single line of dialogue, and uses images and animations in speech and though bubbles to provide the player with gameplay hints and set the story.



I was initially thinking of using a very simple square design, but at the last minute came up with the swirly square design based on the “auspicious cloud” design. The design sort of evolved as I worked out what worked best in a small space with the swirl in the corner.


In Game Maker, I can use one image as a parent object for all “dialogue”, and simply change the content of the box using a sequence of sprites which appear to be inside the box. I tested this on the pacing cat I created yesterday, making sure the box followed the cat. This was simply done with one piece of code with makes the x value of the box the same as the x value of the cat:

x=obj_maneki_neko.x;

I then incorporated a timing system to time the image in and out based on a set time, so that the cat periodically thinks about fish- as long as he pacing and not following the player.

I’ve also created another example of a very small dialogue sequence for the newly placed character-the Shinto Priest. This polite character stands outside the Ryokan and bows as the player passes by. When the player gets within a certain distance, the speech bubble appears displaying the objective and the amount of blossoms needed for progression, although I’m not sure how effective this is as a method of instructing the player in the initial level.