Knytt Stories DS (KSDS)

Version 1.0a

(Last update: April 08th, 2010)

Description

Knytt Stories is a freeware platform game made by Nicklas 'Nifflas' Nygren (http://nifflas.ni2.se/). The game include several short levels ('stories'), and there are many new stories created by the community that anyone can play.
As a tribute to this great game, we have developed a (free) DS version of it - Knytt Stories DS.

How to Install

Requirements

- A Nintendo DS, Nintendo DS Lite, or Nintendo DSi.
- A Flashcart that can be used in the previously mentioned handhelds.

Install

  1. Copy the data folder to the root of your homebrew device (flashcart).
  2. Patch the KSDS.nds ROM with the DLDI tools (http://chishm.drunkencoders.com/DLDI/), and install the ROM in your homebrew device.
  3. Play.

How to Play

Use the in-game manual: The tutorial level. Just press the "tutorial" button and follow the instructions.

How to install new stories

Install a story - basic

  1. Install the story in a local copy of "Knytt Stories".
  2. Copy the folder of the story. Story folders are located in <KNYTT FOLDER>/Worlds
  3. Paste the folder of the story in the /data/dsknytt/Worlds folder of your flashcart.
  4. Play

Install a story - music

Converting music tracks - Using the Open Source Audacity tool
  1. Launch Audacity
  2. For every .ogg file in the music folder:
    1. Load the Song<NUM>.ogg file (example: Song1.ogg)
    2. Tracks -> Stereo to Mono
    3. Tracks -> Resample (change to 22050)
    4. Project Rate [toolbar located in the bottom-left part of the application] (change to 22050)
    5. If the volume of the track is not very high, use Effect -> Amplify to increase it
    6. File -> Export... -> Save as: Mp3 -> Options: Bit Rate (select Constant), Quality (select 48 kbps), Channel Mode (select Stereo), to file Song<NUM>.mp3 (example: Song1.mp3) in the same directory of the Song<NUM>.ogg file.
NOTE: mp3s with a size bigger than 1MB will probably not work due to memory restrictions. In this case, lower the qualiy of the music at step 5:  16kbps (example: sky flower (sorry, nifflas!)) or 24kbps (example: don't eat the mushroom).

Converting ambiance tracks - Using the Switch Sound File Converter. (Version 1.51, Free edition)
  1. Launch the Switch Sound File Converter, with a Ambi<NUM>.ogg file
  2. Output format -> .raw
  3. Encoder Options: Format (8 bit signed), Sample (11025), Channels (Mono).
  4. Press the Convert Button. File Ambi<NUM>.raw should be saved in the same directory of the Ambi<NUM>.ogg file.
NOTE: raws with a size bigger than 500KB~1.0MB will probably not work due to memory restrictions.

Ambiance tracks as music, music tracks as ambiance

Some ambiance tracks (check "An Underwater Adventure") are in fact the music of the story. The reason is simple: music tracks do not loop, ambiance tracks do. In this case, it is possible to convert the ambiance "music" tracks to mp3. KSDS will detect this particular configuration and will adapt itself.
NOTE: Due to limitations of the engine, only one mp3 can be played at a time.

Appendix

KSDS extensions

Upper Screen GUI. Level creators can customize the upper screen GUI of KSDS. The customized GUIs must be 24-bit pngs of 256x192 pixels. They must be located at a folder called System within the story folder, with the following name: Gui_<number>.png.
In order to activate a certain GUI, the following line must be added inside a room coordinate of the World.ini file:
Gui = <number>
Where <number> can be 0 (default upper screen) or any number between 1 and 255 (customized upper screen). Once a GUI is activated, it will remain active untl another "Gui = <number>" is found in another room.
 
(Check the tutorial included in this game for an example).

DS-Specific Info Screens and Cutscenes. It is possible to take advantage of the dual screen of the DS to show extended info screens and extended cutscenes. These extended screens must be 24-bit pngs of 256x192 pixels.
For info screens, InfoA.png will be shown in the upper screen of the DS, and InfoB.png will be shown in the bottom screen of the DS.
For cutscene screens, Scene<number>A.png will be shown in the upper screen of the DS, and Scene<number>B.png will be shown in the bottom screen of the DS.

(Check the tutorial included in this game for an example).

Changelog

- V1.0a (April 08th, 2010)
Solved some issues (lasers, juni's movements) that allow players to play/finish certain stories (Gaia, A Knytt in Time...). Also, expanded some internal structures that allow to play certain levels (The Great Race).
- V1.0 (February 2010)
 Initial Release

Implementation status

Final Version, release 1.0 (19Feb2010).
- Bank Implementation (ALL FINISHED)

[B00 - System]

###########.################***
[B01 - Liquids]
**##**###*#***#*#**##*##
[B02 - Flyers]
+++++++*++***+*****##+*+*####**+
[B03 - Knytt & Fluff]
***********####*****#****###********#######*
[B04 - Meanies]
#####**##***##**##****
[B05 - Shadow People]
***
[B06 - Traps]
#####*+*+####
[B07 - Nature FX]
*******##*******
[B08 - Decoration]
#########*#####*#
[B09 - Flowers]
#####
[B10 - Bouncers]
***++***#####
[B11 - Disks]
#*###*##*##
[B12 - Ghosts]
***#**#**#******#####
[B13 - Robots]
******#######*
[B14 - Earth Beings]
########**#***#***##****
[B15 - Objects and Areas]
##############################
[B16 - Invisible]
+***********####
[B17 - Creepy]
*#*##*******
[B18 - Water Creatures]
******

Legend:
.: Not implemented yet.
-: Partially Implementated.
+: Fully implemented, but the behaviour is quite different from the original. Focus! (In extraordinary cases I'll maintain it "as is") *: Fully implemented, the behaviour is different, but probably I'll maintain it *as is*
#: Fully implemented. The behaviour is very similar to the original :-D.

Known bugs and other details
- Juni's movement is not "per-pixel". As a result, Juni's speed
is different than in the original "Knytt Stories"
- Dialog traslucency does not work, left as an opaque window.
- Management of the minimap and exceptionally big COs.
- In extraordinary cases, the game will hang when trying to play
a mp3 track. This problem usually happens with mp3 that are not
encoded to 48kbps.

Known Issues - Others
- Due to a design decision, the hologram is activated only by
pressing a DS button, not by pressing "down" twice in a
row.

Knytt Stories DS license

Copyright (c) 2010 Rodrigo Roman Castro and Ramon Roman Castro (rrc2soft)
(Original Game "Knytt Stories" copyright (c) Nicklas "Nifflas" Nygren)

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    * Neither the name of "rrc2soft" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Knytt Stories DS - FAQ
FAQ - General
What do I need to play "Knytt Stories DS"?

For playing KSDS, You need a DS / DSi and a homebrew device - a flashcart.

A flashcart? Such as an R4? Aren't those things... illegal?

Only if those devices are banned in your contry. Besides, Homebrew is not illegal, and (for your information) the R4 sucks ;-)

OK, I want to play Knytt Stories DS. What should I do?

Download it and install it in your flashcart. Follow the instructions contained in the .zip file. We also strongly advise you to install the levels contained in the expansion pack - they are worth every minute of your time.

What story should I play first?

The "tutorial", and then "the machine". After that, you are free to play any story you want :-).

Is this game safe for my young children?

I honestly think so. The main character, Juni, cannot kill anyone. There is no depiction of blood or explicit violence, and Nifflas stories are very child-friendly (evil machines that have to be stopped, a daughter that must be found, and so on). For user-generated content, play the story first or ask the original creator.

Who is that "Nifflas"?

The original author of Knytt Stories for the PC, and creator of many free games. Go to http://nifflas.ni2.se/ and you will know him better :-D. What are you waiting for? Go NOW! ;-)

What do you mean with "user-generated content"?

As Nifflas released a level editor with the original game, many fans created (and are creating) levels as of 2010. Some of them have commercial-like quality. You can download these community stories at Nifflas Forum and KnyttLevels.com.

I like how that sounds! What can I do to play these community stories?

Follow the instructions contained in the .zip file of the game. Summarizing:

Can you recommend me some community stories?

Better go to Nifflas Forum and search for "my favourite level" threads.
Oh, and play "Gaia" and "Don't Eat the Mushroom" :-P.

FAQ - Problems
I have a DS / DSi and I cannot play the game in my flashcart!

First, check that you have a /data/dsknytt folder in your flashcart that contains the system folders ("_RAW", "Ambiance", "Gradients",...) of KSDS. If everything is fine but the game does not load, use the "compatibility" ROM included in the .zip file of the game.

Sometimes, when playing a story, if I enter in a new screen the game freezes!

That's a problem in the underlying mp3 libraries. You will probably not find this error, but if you do, you have three options:

What is this "Compatibility ROM"?

A version of the game compiled with older libraries. There will be some visual glitches, but the game should be playable in all flashcarts.

Some big stories take a lot of time to load!

The game needs to parse the map in order to optimize the game. You can disable the optimizations in the "Options" menu, but the transition between screens will be much slower.

Help! The game crashed and a red screen appeared!

That's the Juni's Screen of Death (JSoD), and appears when an error forces the engine to shut down. In most cases the error will happen because of installation problems or memory problems (the story requires too much resources). Still, if the error persists, please contact us.


FAQ - Source Code
Do you realize that you are using unsupported and outdated libraries (PALib, ASLib)?

While we don't regret using these libraries, we have a small warning for developers that use the source code: the code will probably work only with the tools' versions indicated in the readme, so don't bother the toolchain developers if things do not work with new versions, bother us instead ^_-.
As for developers of new projects, if you create a program with tools (e.g. PALib, ASLib) that are unsupported by the "official" toolchain (e.g. devkitpro), your program will probably not be able to compile with the newest tools. Dot it at your own risk, and design things in a modular way so it can be easy to replace any underlying libraries (or port to other consoles! ^_-).

Last Update: April 8th, 2010