Jun 282015
 
Littorina Sounds Logo

Littorina Sounds

Hi there! My name is Roland and I am a half breed. Part physician, part composer and sound engineer with my own company, Littorina Sounds.

I have had the pleasure of working together with Krister and Jona on multiple occasions. When they approached me with a new project I immediately hopped on the “Swedish Bus“, haha. You may find some of my sonic escapades on Sound Cloud . I’ve been doing sounds ans music for over 15 years and started working in the games industry as a freelancer back in 2012.

Roland Sound designer, musician

Roland from Littorina Sounds


All the best, Roland

 Tagged with:
Jun 192015
 

It’s midsummer here in Sweden, it’s a special day where we celebrate summer, it is also the only day of the year where rain is guarantied.

Sophie visiting Svalbard, Norway

Sophie visiting Svalbard

This summer I’m going to take some time just making smaller games, testing some new tech and having fun with development, and of course I’m not going to spend all my time in front of the computer, quite the contrary but every now and then, but as Jona is away on a road trip in the states and Sophie just came back from Svalbard, Norway I thought I might as well.

When I started I had no idea what I wanted to make, it needed to be something quick, an evening or two at the most I thought as I saw the four Xbox controllers I borrowed from work over the summer, and as we are currently in the beginning of hour secret project over here at KJ Interactive, a four player co-op game that will use controllers it felt like a good idea to test that out a bit more.

For the game mechanics, well it just came to me, like a divine intervention from The Great Old Ones themselves, circles and planes just popped into my head and earlier this morning the world greatest game was completed.

Circle Together 4 player coop game

Circle Together

To try and explain Circle Together what it is about. it is for 1 – 4 players (requires game pads) and each plane needs to fill up with the same color as one of the cannons in the middle, you do this by letting the lasers or cannon balls touch your plane and avoid the wrong colors.

You all fly around in this orbit around the cannons and you decide the direction together, if two wants to fly clockwise and the other two counterclockwise you will be in a deadlock, you will be the fastest if you all try and move in the same direction.

The game is beat when all four players is filled up with a color.

Download Circle Together game

And please remember that I have not been able to test it thoroughly, I tried using four controllers by my self, that is difficult but if you do have any questions of feedback you can contact KJ Interactive on Facebook.

I will show you a short video that might show a bit how the game is played, I did try and play four players all by myself with four controllers so basically I just made a video for the fun of it as it won’t really describe that much at all :p

Enjoy
Krister

 Tagged with: , ,
Jun 142015
 

One of the best part of working as a game dev teacher as well as what I do over here at KJ Interactive is that LBS Stockholm can buy the cool tech, and I get to use the cool tech, and that is exactly what I did not many days ago.

Tobii and SteelSeries worked together to create a consumer friendly eye tracker, and for you that are not familiar with what that is I give you a short description.

Eye Tracking attached to a screen.

Tobii SteelSeries Eye Tracker

Eye tracking is a device or task of surprise, surprise… Tracking your eyes, and to be exact, what you are looking at on a screen, this can be used to analyze how users interact with software, web sites and so on, and also as an input model, seen most recently in Assassin’s Creed Rouge.

Well, the school has two of them and as I am suppose to use it for teaching and the kids are home during the summer I took them home with me to try them out and get me some brain smarts.

Before I go deeper into this I will give some credits, I will begin with Roland Koch from  a composer and sound designer I’ve worked with previously and and currently and will continue to work with, you can check out his work and follow him here:

Littorina Sounds on Facebook

SoundCloud

I also used some graphics I found online from the following sources:

Game Art 2D

One Point Six Studios

Jelly Doom

Screenshot eye tracking

Jelly Doom

Is what I sou creatively made, you play as a wheel chaired girl whose brother stole her so critical means of transportation leaving her stranded on a weird floating in the air island and these yellow jellies keep jumping out splashing on the ground filling the increasingly narrow space with jello-fluids threatening to kill her unless she shoots them first with her L.A.S.E.R gun, I know, it’s an awesome idea.

The mechanics is you have to shoot the Jellies and you aim with the help of an eye tracker or mouse if you want to try it but don’t have an eye tracker. Every now and then a new Jelly jumps out and bounce around and if it drops from a small platform it will increase the level of Jelly blood until it threatens to drown you.

Development

Setting everything up was a breeze, from installing the device (have some requirements like USB 3 etc) and after getting the SDK from Tobii (the have packages for Unity, Unreal and more) I started coding and it was all quite simple, the only issue was the extremely jittering, at first I thought had spastic eyes but after researching it for a few hours in front of the mirror I came to the conclusion that I might have a lot of issues but spastic eyes was not one of them. Having to deal with this issue was not a major issue, slowed it down, lerped it and made it work just a lot of slower than I initially had hoped for.

Jelly Doom Unity and VS 2015 screenshot

Screen of development of Jelly Doom

Conclusion

I have’t tried eye tracking in any games so maybe you can do some awesome stuff with it when it comes to controlling a game but I saw some drawbacks when it comes to using it when speed is an issue as well as accuracy and I also have a difficulty seeing it being a major part of game mechanics, and thinking about if for an hour or so you know I’ve fully visited the problem.

I can kind of see it as a tool in a horror game, getting under the players skin if he ever gets so scared he closes his eyes or shows erratic eye movement you start the Sound Horror Intense Terror-treatment but it would be interesting to hear your ideas on eye tracking and game design.

You can see a short gameplay video below or download it (KJ – Jelly Doom) and try it for your self, should be playable with a mouse as well but our QA-department doesn’t exist just so you know.

Hope you all enjoyed it and get to try some cool tech on your own, I would really like to hear about it and of course get to know about any new interesting tech out there.

// Krister

 Tagged with: , ,
Jun 072015
 
Traveling to Jönköping and LBS Game Awards

Krister looking forward to a long train ride. Image from Red Line Games

It was the last Friday of May, the clouds were hanging over us like an overly active shower head, our clothes trying to suffocate us by clinging to our cold bodies. The tunnel of our minds was dark, damp and lonely, but suddenly we saw a shimmer of light at the end of it and as we draped our eyes with whatever designer sunglasses we brought with us we started our journey towards it.

A few hours later, still early for us hard working developers we arrived at Jönköping, why? Because it was time for LBS Game Awards, the yearly event where all the game design student’s knuckles up and compete for the affection of the industry related jury members.

This year they represented:

LBS Game Awards took place at the same time as Consolidate (a LAN event working for the noble task of bettering the world of E-sport), and LBS Game Awards got to be a part of that.

LBS Game Awards 2015 crowded event

LBS Game Awards 2015

All and all the Game Awards part of it was pushed out in a balcony like corridor with a smaller stage below it with no lights except for the backlit projector making it very difficult to see anyone stage.

The students were kind of shy, but that’s understandable, they might be inexperienced and afraid to grab a hold of people letting them play their awesome game. I remember myself on these kinds of events, I use to hide behind anything I could find.

Anyways, all the projects could compete in several categories that you can read about below, LBS Stockholm (my awesome students) were there with two projects; Sallad and Goof Rat.

LBS Game Awards categories and winners (some Swedish might appear in project links):

  • Best pitch – The Traveler.
  • Best Sound – Kontur with Binary as runner up; and please take note that Kontur mentions in its description how the have place holder sound effects but everything else is made by them. 😀
  • Best Technique – W0rp and Antihero as runner up.
  • Best 2D Graphics – Spacecode Atlas and runner up was Kontur.
  • Best 3D Graphics – Sushido won and runner up was Goof Rat, how Goof Rat did not win is beyond me, they had a fully animated human and humanoid rat but I might just be biased.
  • Best Newcomer (first year students) – DRPG with Goof Rat as runner up, and here I’m just at a lack of words…
  • People’s Choice Award – An interesting award indeed as there were no people, the public was not invited, it was just students and teachers, but Sushido won, a fun wave fighter game.
  • Best Game – Cut was number one with Kontur as a close runner up.

It sure can’t be easy setting this event up as teachers that also have to deal with class and everything, and it shows, mainly when it comes to the information and communication to our students what to expect the format of the event so they can prepare and make the most of this event.

We did have great fun and it is a good experience for all students to have and I hope the event in future years will only grow and improve as well as including the other branches of education the LBS schools have to offer.

I’ll let you go with a video summary of the event from Red Line Games point of view, and yes, I’m in it so you know you don’t want to miss this piece of eye candy.

Jun 062015
 

Before you start, I have some glad news, you can follow us on our journey for our latest game project Eco Tales.

Well well well… Jona sure gets a lot of attention from his “awesome” UE4 tutorials, we can’t have it like that, I needs to get mine. However, with a voice suitable only for silent movies I have to settle for text versions, but knowing Jona he probably swoop in to save the day and record them for me.

Anyways, you can chose to download the KJ – Basic Localization pdf version or just read it here, I hope you do enjoy it and learn from it and I would really appreciate some feedback on it (you can do that on our Facebook page).

[expand title=”Read Tutorial”]

This tutorial

Will teach you a basic way of doing string localization in the Unity3D engine where you will be able to switch language on the fly in run-time.

We will be coding this with C# but should not be too great a challenge translating this to you preferred scripting language.

All the strings will be saved in an XML-file meaning this might not be completely cross-platform nor the most suitable solution, something for you to research before you chose this solution for your localization needs in a live project. I will not go into much detail about the xml-file format.

Before we start

You need to create or open a Unity project, I will jump straight ahead into the action leaving everyone behind if you are not up to speed.

The language files

Where are strings will be saved will exist in XML-files, we will in the scope of this tutorial create two such files and put them to use.

I will create one for English and one for Swedish and name them according to the language English display name; English.xml and Swedish.xml

The content of the files will be as follows.

English.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
    <Phrases>
        <Hello>Hello World!</Hello>
    </Phrases>
</Root>
Swedish.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
    <Phrases>
        <Hello>Hej Världen!</Hello>
    </Phrases>
</Root>

As you can see, we have a Root node, everything we do should exist inside of that and everything one level down, all the direct children of the root node will be Categories so we can for our own sake keep track of everything. This takes us to the important part, the actual strings that we want to localize, those exists just one level down from a category where the tag works as the ID, we will use that pull the text we want to show.

Now we need to save those files, and you might want to save them in the Resources” folder but I will go ahead and save them in a new folder named Languages, that way we can have them outside of the project after building it so it is edible for everyone and you can easily install new languages.

The Code file

Is our next step, this is where we will make sure we can use our language files and retrieve our localized strings.

I start by creating the C# file and naming it to LanguageManager and place it inside a folder named Scripts.

Let us now open it up and start coding.

OK, we have our LanguageManager class, I have stripped it on everything adding to it as we go also making it inherit from ScriptableObject instead of MonoBehaviour, and for simplicity I will start by turning this class into a Singleton meaning we can only have one instance of it.

I achieve this by having a static member variable of the very same class and we can retrieve this instance via a public Instance property that will check if an instance exists or else create one.

I add the following code to my class.

using UnityEngine;

public class LanguageManager : ScriptableObject
{
    #region Singleton

    private static LanguageManager instance = null;

    public static LanguageManager Instance
    {
        get
        {
            if (instance == null)
            {
                instance = CreateInstance<LanguageManager>();
            }

            return instance;
        }
    }

    #endregion
}

 

Our next step is to create the rest of our member variables, four in total and all private:

  • XmlDocument mainDoc – This will be how we access to the currently loaded xml document.
  • XmlElement root – This is our root node where all the categories are listed beneath.
  • string languagePath – The file path to the folder that contains our langage xml files.
  • string[] languageFiles – A list of all the available file names.

However if we want to be able to use all those fancy Xml datatypes and also be able to load files we need to go to the top and type in our using directive to give us access.

Closing our Singleton region will give us the following code.

using UnityEngine;
using System.Xml;
using System.IO;public class LanguageManager : ScriptableObject
{
    +Singleton

    private XmlDocument mainDoc = null;
    private XmlElement root = null;
    private string languagePath = string.Empty;
    private string[] languageFiles = null;
}

Let us quickly move on and override the Awake method, this method is run only once and is a good place to initialize some variables.

What we will do here is set our languagePath and also cheat a bit by calling a method we yet have to create, we will call it Collectlanguages and what it is supposed to do is getting all the available language files we have.

Before I show you the code we might as well create out CollectLanguages method that I will make private and in which I collect the full filename of every file in our language folder path.

void Awake()
{
    languagePath = Application.dataPath + "/Languages/";
    CollectLanguages();
}

private void CollectLanguages()
{
    try
    {
        DirectoryInfo langDir = new DirectoryInfo(languagePath);
        FileInfo[] files = langDir.GetFiles("*.xml");

        languageFiles = new string[files.Length];
        int i = 0;

        foreach (FileInfo fileGo in files)
        {
            languageFiles[i] = fileGo.FullName;
            i++;
        }
    }
    catch (System.Exception e)
    {
        Debug.Log(e.Message);
    }
}

As you can see I place the code in CollectLanguages inside a try-catch block, this is because I want to handle any exceptions/errors gracefully, we might want to shut down if we cannot find any files but for now I will just debug it into the log.

The next part is where we actually load the xml file, in this tutorial we will keep our file open and use it as soon as asked too, another way would to load all the string and then close the file and ask your container for the localized text instead.

We will need to methods, first one GetLanguageFile will retrieve the path of a language file based on the language you want.

We will step through our list of files and see if we can find the file corresponding the language we asks for.

private string GetLanguageFile(string language)
{
    foreach (string langGo in languageFiles)
    {
        if (langGo.EndsWith(language + ".xml"))
        {
            return langGo;
        }
    }

    return string.Empty;
}

We will use the above method in our LoadLanguage method which will open up the actual file and give us access to its sweet content.

public void LoadLanguage(string language)
{
    try
    {
        string loadFile = GetLanguageFile(language);
        mainDoc = new XmlDocument();
        StreamReader reader = new StreamReader(loadFile);
        mainDoc.Load(reader);
        root = mainDoc.DocumentElement;
        reader.Close();
    }
    catch (System.Exception e)
    {
        Debug.Log(e.Message);
    }
}

The last part of the LanguageManager code fil is to write the Get method, we will use that one for retrieving an actual text by sending in a category and ID, now I have placed that in a try-catch block as well because you seldom have to get a lot of text during a time critical part of the game so I have prioritized error handling over speed.

I have also made sure it replaces any new line marks with an actual new line so we can in our text insert line breaks.

public string Get(string path)
{
    try
    {
        XmlNode node = root.SelectSingleNode(path);
        if (node == null)
        {
            return path;
        }
        else
        {
            string value = node.InnerText;
            value = value.Replace("\\n", "\n");
            return value;
        }
    }
    catch (System.Exception e)
    {
        Debug.Log(e.Message);
        return path;
    }
}

Testing it

Is our next step, we will create a new C# script, I call it Test and we will let it type out our result in the log console. We will work solely in the Awake method.

using UnityEngine;

public class Test : MonoBehaviour
{
    void Awake()
    {
        LanguageManager.Instance.LoadLanguage("English");
        Debug.Log(LanguageManager.Instance.Get("Phrases/Hello"));

        LanguageManager.Instance.LoadLanguage("Swedish");
        Debug.Log(LanguageManager.Instance.Get("Phrases/Hello"));
    }
}

We will then create a game object and place the Test component script on it and press play and as you can see if everything went as we want, it should print out “Hello World!” and “Hej V�rlden!” (The console cannot handle Swedish that is why we don’t get an ‘Ä’).

Connecting it

To Unity’s new GUI is what we want to do so the last step was just to show it worked, but to make it useful we will create a component that we can attach to a widget making it pull the text it wants.

The Unity GUI canvas in the hierarchy window

Canvas in hierarchy

Let’s start by creating a GUI Canvas, we will need two buttons for changing the current language and one textbox to display the localized string in.

To hook it up to the language manager we will create a C# script and place it on any Text object, in this example that is three different objects, and all named Text.

I will name the script LocalizedText begin with the fun part, coding.

We will only need two things, the Start method were we will call the method LocalizeText setting the text property of the text component, make sure you are including the using directive for UnityEngine.UI, and also a public string member called localizedID which we will set via the editor containing the category and ID of the string we want, for example “Phrases/Hello”.

using UnityEngine;
using UnityEngine.UI;

public class LocalizedText : MonoBehaviour
{
    public string localizedID = string.Empty;

    void Start()
    {
        LocalizeText();
    }

    public void LocalizeText()
    {
        Text text = GetComponent<Text>();
        if (text != null)
        {
            text.text = LanguageManager.Instance.Get(localizedID);
        }
    }
}

It is important to remember to load a language first, this is currently done in the Awake method of the Test script.

For the buttons we need to add text to the xml files

English.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
    <Phrases>
        <Hello>Hello World!</Hello>
    </Phrases>
    <LanguageNames>
        <English>English</English>
        <Swedish>Svenska</Swedish>
    </LanguageNames>
</Root>
Swedish.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
    <Phrases>
        <Hello>Hej Världen!</Hello>
    </Phrases>
    <LanguageNames>
        <English>English</English>
        <Swedish>Svenska</Swedish>
    </LanguageNames>
</Root>
Setting up the Unity GUI button events

Setting up the button events

The final step is to hook the buttons up, let us use the test script for this, lets add a public method called OnLanguageClick and hook up each button to use that method and send in the name of the language we want as a parameter.

In the OnLanguageClick method we add the code to change the language.

public void OnLanguageClick(string language)
{
    LanguageManager.Instance.LoadLanguage(language);
}

For the changes to actually take effect in real time we need to enforce it by calling the LocalizeText method on the LocalizedText component.

public void OnLanguageClick(string language)
{
    LanguageManager.Instance.LoadLanguage(language);
    LocalizedText[] texts = FindObjectsOfType<LocalizedText>();

    foreach (LocalizedText text in texts)
    {
        text.LocalizeText();
    }
}

Take it further

Is totally possible, one thing you can do is implement a way to have dynamic parts so that you can for instance say Hello and have it type out the players name, this I might create in a later tutorial, but for now enjoy and don’t be afraid to follow us to get more tutorials on Unity3D, Unreal Engine etc… or just see what kind of shenanigans we are up to.

Download the example Unity project.
KJ – Localization example files

http://blog.kjinteractive.net/

Also if you are interested in Indie localization for games do not hesitate to joing the Facebook group Indie Game Localization.

Kind regards
Krister Cederlund, KJ Interactive

[/expand]
 Tagged with: , ,
Jun 012015
 

Well howdy fellow devver!

We’re getting rather well acquainted by now, aren’t we? So many topics to cover in this wonderful engine, I’m just getting started, I hope the same goes for you!

In the first part of the video we look at changing the speed of our animation using material functions.

In the second part we return to 3D Studio Max for frame reductions which will lower the texture sizes and thus free up memory.

Official stats from Epic : In this video we go from a low 252 KB to an insane 13 KB
Vertex Offset Texture: 8 bytes per vertex per frame (each pixel)
Normal Texture: 4 bytes per vertex per frame (each pixel)

 

Keep an eye out for annotations, these allow you to skip things you already know if you’ve watched my other videos!

If you enjoy the videos, please leave a comment on our Facebook page, press that like button! Or maybe even subscribe! There is more to come, I mentioned that right?

 Tagged with: , ,