Week 4, Wednesday

Continuing from last Monday, our 2 man team is still struggling with technical issues, however not without prevail! Below we will walk through the barriers we have faced, how we got around them and what is left to be done. For this week, at least.

Graphical optimization and smoothing out transitions

Up until today the graphical assets for World One had only been tested in the Unity Editor, with no changes to the standard settings. This means that the graphics has so far been made to look smooth and nice on machines exactly like Calles, and with the exact same settings. This is of course not viable, as we want as many people as possible to have the possibility of playing the game. More so if we want to release the game on mobile devices, which are often weaker than the average PC.

As it turns out, the otherwise so smooth transitions between levels were not so smooth when the graphic settings were bumped up. However with help from Michael we were able to find a bug in the script for the transition, keeping it consistent between graphic settings and machines.

The transitions at hand is what most of the work has been done for. How they are made were however covered in our last post, so this slideshow to show our progress will suffice:

Something Calle did

What is obviously missing is the transition from the last stage (W1L3) to this worlds ending sequence (W1L4), were the player will dive into the vast ocean (W1L4.5). That too is left to be done.

Organization and fading text

As Michael started to finish up the programming for the gameplay mechanics last post, and was hence ahead of schedule, he could start working on the mechanics for the text. The text in the game is the story bits of it, and is planned to be shown in between levels. It is crucial that the player reads this text and might need some motivation; however this is something we can cover when we get there.

There was perhaps more work than planned needed for the text, which needed functionality to fade in and out. The same functions were initially meant to be used for the texts background, but needed other methods as GameObjects does not act the same as GUIStyles (both are classes in Unity). An option was to have the text be a texture, basically making it behave the same as the background, but its quality would be lower and the iteration clumsy as a change in the text would warrant the import of an entirely new texture.

Timers or cool downs were needed to make the text behave properly, gradually fading while the timer ticks to zero, but did not work as intended. The fading would act weird, but was later solved by using a solution similar to the one Calle uses for transitions between levels.

Michael later created a base class which held all the basic functionality needed by every child class (the sequence classes), the children could now be made smaller and easier to manage. These smaller classes retrieve basic functionality, such as the creation and fading of text and backgrounds, from the base class which means that Michael will be able to create new in-game text sequences faster.

Michael initially worked with Coroutines (Link below) to try and find a way for the fading to work on the text. A Coroutine is a function that can use the yield keyword to wait for the next frame to continue performing its logic. Michael had problems getting the Coroutine to work with several different texts at the same time, as the increment variable for the fade wasn’t reset once a new text called the same Coroutine. This made for buggy fades where some texts would pop up without even fading, or even fade multiple times.

In the end, Michael decided to skip the Coroutines for the fades, but still managed to use their functionality to solve another bug. The GameHandler class is used to initialize every other Handler-class, such as the TextHandler Michael has worked with this week. A bug arose where a function call made to the TextHandler class ran before the Constructor of said class. This created an error as the function used a variable initialized in the Constructor. The problem was solved by creating a delayed Constructor in the GameHandler class, which could run the function call to TextHandler with a delay of two seconds, giving the Constructor of TextHandler enough time to run first. The delayed Constructor was made using Coroutines, since a Coroutine can be made to wait for a set amount of time before continuing with its statements, the function call could be made at the end of the delayed Coroutine thus eliminating the bug.

Coroutines in Unity: http://docs.unity3d.com/Documentation/Manual/Coroutines.html

Future plans

As the text mechanics are shaping up Michael can start implementing the text, or the story rather, to the game. The texts relating to life philosophies have been ordered and we are awaiting their arrival. To get the most use out of these texts we plan to wait with the story until we have actually read them.

As said above, some of graphical assets are still missing for World One, but the plan is to get them done by the end of the week. Calle will also begin making proper concepts for the pieces, continuing from silhouettes and other quicker concepts made before. With this we will almost have World One complete, however with some graphical assets missing, no sound and no story. This will of course come at a later stage in development.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: