Otaku World Home

Kamishibai FAQ

FAQ Table of Contents Story Index Viewer

How do I create a Kamishibai story?

In brief, a Kamishibai story consists of a file called "gamefile.txt", a bunch of images, sounds (if any), and music (if any). The gamefile.txt file is a typical ASCII text file containing all the commands and text that make up the story itself. This file tells Kamishibai where to find the art, sound, and music as well as what specific art, sound, and music to play for each scene. Without this text file, there is no story!
There is a document that comes with the Kamishibai viewer called scenedef.txt (for those who can read Microsoft Word documents, there is a file called scenedef.doc). This describes the syntax and layout of the gamefile.txt file. There is also a file called NEW_STORY_BLANK_file.txt which contains examples of all the script commands you need to make a story. You can copy the blank file as the start of your own game file.
To start a story, you will need a place to work. What follows is a step-by-step tutorial for creating a simple three scene story file using resources from "The Legend of Ika Takozushi", the story that comes with the Kamishibai Viewer.

Story Creation Tutorial

Starting a New Story

  1. Go to the Stories folder in the Kamishibai folder. All stories, whether you create them or download them, go into this Stories folder!
  2. Now, create a folder in the Stories folder that is the name of your story (or reflects the name of the story if you use a long title. For example, "The Legend of Ika Takozushi" appears in the folder Takozushi). For this tutorial, name the folder Tutorial.
  3. Inside this new folder, create three folders called images, sounds, and music. Each of these three folders will hold all the image, sound, and music files of your story.
  4. Copy the NEW_STORY_BLANK_file.txt to your new folder and rename it to be gamefile.txt. This is the starting point. You are now ready to start writing your story!
  5. Fire up your favorite editor or word processor. For now, I will assume you are working with basic equipment so launch Notepad. If you are using some other program, remember to save the file in ASCII format (sometimes referred to as "MS-DOS text").
  6. Load up your new gamefile.txt file you just created. If you haven't read the scenedef.txt file yet (it came with Kamishibai and can be found in the same folder as the viewer), do so right now. It may seem a little confusing but it will become clearer as you work with it. Also, study other people's stories to see how they did it. "The Legend of Ika Takozushi" is a good place to start as it comes with Kamishibai.

The "Game File"

The gamefile.txt file is organized into scenes. Each scene starts with a name in square brackets such as [Scene 1] or [Cry Out Loud]. There are two special scene names that help the Kamishibai viewer get things started. These are [Title] and [Setup]. At the top of the new gamefile.txt file, you should see the following [Title] scene:
          @Name      = Title Of Work
          @date      = Date And Year
          @version   = v1.0
          @author    = Author Name
          @artist    = Artist Names
          @company   = Company Or Name
          @copyright = Copyright (C) 2009 by Name
          @contact   = Contact Information
The items on the left of the equals sign ('=') are the properties of this scene. They represent what this scene can show or do. The stuff on the right side of the equals sign is what will be displayed or used. For the Title scene, this information is displayed when your story is first loaded (i.e., a title screen). The @Name, @author, and @artist are required, the rest are optional. However, I strongly encourage you to use all the fields so you get proper credit for writing your story! The @Name property is what will be displayed in the New Game dialog. It is also displayed on the title screen. Go ahead and change the various properties here to suit your liking. For now, enter Kamishibai Tutorial as the name. You can change the information in the other fields as you wish, but for now keep the text you enter fairly short until you get a feel for how much can be displayed. I will show you how to do that in just a moment.
The next scene is the [Setup] scene. This looks like the following in your new gamefile.txt file:
          @musicdir   = music
          @sounddir   = sounds
          @imagedir   = images
          @FirstScene = Scene 1
This scene tells the Kamishibai viewer where to find the images, sounds, and music files. Each of the first three items specify the name of folders in your story folder where music, sound, and images are stored, respectively. This setup scene also indicates which is the first scene of your story. For now, just leave these things alone. (Note: if you don't specify a scene name in @FirstScene, the first scene that isn't a [Title] or [Setup] scene will be used as the first scene of the story.)
The next scene that appears in your gamefile.txt file is currently labeled [Scene 1]. You can name this scene anything you want just so long as the @FirstScene property of the [Setup] scene has the same name. Here is a basic scene:
          [Scene 1]
          @image       = scene1.png
          @music       = scene1.mid
          @description = Once upon a time, in a land far, far away...
          @option1     = Continue
          @link1       = Scene 2
This scene will display an image called scene1.png, start playing some music called scene1.mid, and display the text given in the @description property. The @option1 property displays a label with the text Continue that the user can click on to move to the next scene. The @link1 property tells Kamishibai what scene to go to when the user clicks on the option. There can be up to 4 options. Every option must have a link and every link must have an option.
Here is a second scene to go with the first scene:
          [Scene 2]
          @image       = scene2.png
          @sound       = scene2.wav
          @description = A dragon was eating a peasant.
          @option1     = Continue
          @link2       = Scene 3
          @option2     = Back
          @link2       = Scene 1
In this scene, we have a new image, scene2.png, and a sound effect called scene2.wav. This sound will be played only once and then stop. There is an option to play the sound more than once but more on that later.
You will notice that there is no @music property specified. Kamishibai will continue to play the same music from the previous scene. This is also true if you specified a @music property with the same music file that is currently playing; Kamishibai just keeps playing the current music. However, if the specified music file is different, then Kamishibai will start playing the new music file.
If you wanted to stop the music, specify the music name STOP; for example, @music = STOP.
In this second scene, you will notice there are now two options, one for going forward, and one for going back. It is generally a polite thing to offer the user the ability to go back and reread something. The option and link pairs are always numbered from 1 to 4 (i.e. @option1, @option2, @option3, and @option4). Each of these correspond to a specific slot on the Kamishibai display, with @option1 being at the top slot and @option4 being at the bottom. This means that if you specify only @option4/@link4, the text will be displayed in the bottom link slot. This gives you more room for the description. Many stories take advantage of this to provide greater detail in each scene.
Okay, now, lets create a third scene that will finish this simple story.
          [Scene 3]
          @anim        = scene3a.png, scene3b.png, scene3c.png
          @animspeed   = slow
          @animloop    = 0
          @music       = scene3.mid
          @sound       = scene3.wav
          @soundloop   = 3
          @description = A knight came along and hacked and hacked and hacked at the
          dragon until the dragon was dead.\n\nThe end.
          @option1     = Beginning
          @link1       = Scene 1
          @option2     = Back
          @link2       = Scene 2
This scene displays an animation sequence of scene3a.png, scene3b.png, and scene3c.png, starts the music file scene3.mid (after stopping any previously playing music) and plays the sound file, scene3.wav, three times before stopping. You can specify any positive value you want here or you can specify the special label FOREVER to loop the sound forever (when you leave the scene, the sound is stopped).
The animation is accomplished by simply displaying each image in the list of images given in the @anim property. These are displayed at slow speed (about 1 frame a second) and will be played only once, stopping on the last frame (the @animloop ="0" says repeat this animation 0 times).
Another special feature to note is the "\n\n" in the description. Each \n stands for a carriage return or new line and will move the following text to the beginning of a new line. You can even use these carriage returns in the [Title] section to good affect. This is how you can separate lines of text for easier reading such as in writing dialog. For example,
          @description = Joe: "Nice day, Bob."\nBob: "yep."\nJoe: "Snow tomorrow,
          Bob."\nBob: "yep."
comes out looking like this:
          Joe: "Nice day, Bob."
          Bob: "yep."
          Joe: "Snow tomorrow, Bob."
          Bob: "yep."
Okay, we have completed the gamefile.txt file. Save this file. We now need to create six images, two sound effects, and two music files.

The Images

To create the images, fire up your favorite paint program and start drawing-- But wait! You need to know the size of the canvas to work with! The size is always 200 pixels wide and 112 pixels high, no more. Also, the image must be stored as either a PNG (Portable Networks Graphics) or a Windows Bitmap (.BMP) file. PNG files are the preferred format because they are a lot smaller than BMP files. You can save the image in 16 color, 256 color, or 16 million colors. Just be aware that there are still some people who have their Windows configured for 256 colors and 16 million colors tends to reduce to pretty crappy images in that mode.
Create six images, each 200 pixels wide by 112 pixels high and save them in the Images folder of your story folder under the names scene1.png, scene2.png, and scene3a.png, scene3b.png, and scene3c.png.
If you are impatient to get on with this tutorial, just copy six image files from the image folder in the Takozushi story to your image folder and rename them scene1.png, scene2.png, and scene3a.png, scene3b.png, and scene3c.png. I would suggest the following Takozushi files:
rename to Tutorial
 8.png  ==>  Scene1.png 
 14.png  ==>  Scene2.png 
 35.png  ==>  Scene3a.png 
 36.png  ==>  Scene3b.png 
 37.png  ==>  Scene3c.png 

The Sounds

We need two sound files. Sounds are always Windows Wave (.WAV) files. These can be 8 bit or 16 bit, mono or stereo. Just be aware that if the user's hardware cannot handle a particular format, they won't hear the sound! Most people nowadays have 16-bit sound cards. However, 8 bit sounds often sound okay and are half the size of 16-bit sounds. Keep this in mind as you create your epic work.
If you have a sound editor, you can create two sounds and name them scene1.wav and scene3.wav. However, if you want to do what almost everyone else does, copy them from another story! Although it is generally better to create your own sounds, sometimes you don't have the means to do so. For now, lets take two sounds from Takozushi. Copy the following Takozushi sounds to the sounds folder and rename them appropriately:
rename to Tutorial
 war.wav  ==>  Scene1.wav 
 machete.wav  ==>  Scene2.wav 

The Music

Finally, we need some music. If you are a musician or know one who can create midi files, just write some music. For those of us who can't write music or can't produce midi files, it's time to borrow again. From Takozushi:
rename to Tutorial
 Chronojanus.mid  ==>  Scene1.mid 
 FinalBoss.mid  ==>  Scene3.mid 


You have just created a story! Load up Kamishibai and check your new story out! Click on New Game, select the title of your story. Kamishibai will display the title screen with all the information you entered. Note how the text is laid out for each property. This will give you a feel for how much text you can actually enter. Click on the Begin Play button and you're off! Click through each scene and see how each element is displayed and heard. When you are done, quit Kamishibai to turn off the music (or view another story).
That's all there is to creating a story. The scenedef.txt file, included in the Kamishibai installation, describes each property (also called keywords) so if you have any further questions, try there first. Also, see if there are other stories that do what you are trying to do and see how they did it by examining their gamefile.txt.
Good Luck!

FAQ Table of Contents Story Index Viewer