So this week had one task. One job that had to be done. It was long, it was boring, it was tedious. It was implementing Katakana into Kana Quest.

Why is implementing Katakana such a chore I hear some of you wonder. Well simply because implementing each Katakana has a bunch of steps that are not at all interesting and when you times those steps by 46 (the number of kana) things get very boring very quickly.

So the pipeline is as follows.

  1. Create the sprites. (We talked about this last week as I was most of the way through making the Katakana Sprites at that point.)
  2. Set the image setting for each sprite.
    1. This isn’t too bad what I have to do is tell unity how it should process each sprite. How big the image is (pixels per unit), its filter type (point filter as bi-linear and tri-linear make pixel art look awful) and if its a single or multiple sprite image. Now all of the above I can do all in one go by selecting all the files at once, but below I have to do one by one, because Unity wont allow me to do this in batch. Finally I have to set the sprite size for multiple sprite Kana. So for each Katakana I had to go into the sprite editor and tell it to divide my sprite sheet how I wanted it divided.
  3. For each kana make an animation using the unity animation system.
    1. For the stone tiles this is easy. They are just one frame so its just a matter of dragging and dropping the image into a new animation. For the normal tiles this takes a while longer because I have to copy the animations seen on the Hiragana Tiles. But the big annoying part of this step is that I have a LOT of animations on the one object now. So much so that they don’t all fit on screen so adding a new animation took about three seconds of scrolling down the animation list before I could get to the “make new animation” button.
  4. Add those animations to the animator of the tile object, and then set up the logic of when to play those animations.
    1. So putting the animations into the animator is easy. Select all the files you want and drag them onto the animation screen. Setting up the logic has to be done one by one and is really tedious. Right click from where you want the tile to transition from and to (from all to each individual animation in this case). Then click the arrow that comes up and create the parameters controlling the animation. In this case, what is the tile’s hiragana number? Is Katakana enabled? And is this a stone tile or a normal tile. Rinse and repeat 92 times.
  5. The last step is to add a control for turning Katakana off and on. This was the last and easiest step. Now if the player presses ctrl+shift+k in game katakana will be toggled on and off.

And that’s the process. Since you got through all the technical stuff your reward is some gifs! Enjoy!KatakanaDemo

SoneKatakana

Advertisements