Hi all, and welcome to the Kana Quest Dev-Blog for this week. This week I am going to show you a small part of Kana Quest’s pipeline. Specifically, the process I have to go through to add new world art onto the previous world. Which, full disclosure, is terrible. When I was making my parallax system I did not consider the fact that someone would have to use said system. And that someone would ultimately be me. How that slipped my mind as a solo game dev, I don’t know but here we are.

With that said, what do I mean specifically when I say I am adding the new world art onto the previous? Well a few weeks ago I talked at length about the process for creating the background art for the 6th world in Kana Quest. Isn’t it nice? But unfortunately I now have to get this art from Photoshop, into Unity.

World6WIP3

Legit, still really chuffed with how this art turned out. I would give myself a pat on the back if it weren’t for the horror I am about to inflict on myself.

And then once into Unity, get it to connect onto the previous world’s art. You would think this is easy. And it should be. But then you know… my coding exists sooo guess we can’t have nice things.

w5wip

I remember when I thought getting this world to connect was going to be easy.

See I can’t make them connect by putting the two finished images side by side and creating some transitional artwork. Because of one thing. All these environments use a parallax effect, so the point in which each part of the world will end in different places. And the only way for me to know exactly where that is, is to make a world’s art, implement it, then figure out where the end of that world will be, and finally create an end point for the art. But then we have to start worrying about the game objects that handle the parallax effect for the art, as well as trying to make the transition seamless by making transitional art. Like I said before, this is not a great pipeline. But on the bright side Franz Kafka is incredibly proud of me.

So let’s look at what everything looks like at the start of this “process”. This is the level select scene before I add any of world 6’s art.

5thWrldScene

As you can see in the first image the foreground images extend way further than the sky does. This is to compensate for the parallax effect moving these images faster than the ones in the background.

World5Gif

As you can see in game, everything lines up and looks nice, unlike how it does in their initial placement. Remember, as long as the player doesn’t see your garbage fire you can just pretend it doesn’t exist.

 

So the first job I need to do is figure out the point that the transitional art will start. This is pretty easily figured out by scrolling to the end of the world and seeing roughly where the camera ends.

5thWrldScene2

The arrow is pointing to the effective end of world 5 because it is the point where the last level button appears to the player. So everything beyond this point will be used to transition to the next world.

So now that we have our end point we have to start making transitional art. I start with the sky because we want it to the first to change. The sky moves the slowest and thus will be the last to finish switching over to the new pallet (even with a head start). Making the transitional art is also really easy as it just involves dithering between the original colours to the new colours, like so. It’s vital to give yourself easy goals to score. This will lull yourself into a false sense of security, and get you thinking “Surely its not as bad as I remember”.

W5SkyEnd

5thWrldScene3

As you can see here, the transitional sky image cuts a little bit into world 5. 

Then we repeat this process for each layer in the world. So for this world we do it for the buildings, the park, the stalls, the lanterns and finally the ground. Each layer should be staggered a little bit so that the final result should look something like this.

5thWrldScene4

You can see how the off screen starting point for the transition art is staggered so that the foreground images start further away. But by the time the player scrolls past they will all line up and look great. Remember, as long as the player doesn’t see your garbage fire you can just pretend it doesn’t exist.¬†

But this is just for the transitional art. Once we have the transitional art in place we have to position the world 6 art to line up properly. But because the parallax effect is handled by different objects for each world, you can’t line up the images in the inspector and call it a day. I have to figure out where those images have to be so that once moved by the parallax script in game, they line up. But in the scene viewer, the final positions overlap and look pretty awful. This step is the most time consuming and irritating as its like putting together a jigsaw puzzle except all the pieces are moving and you don’t get to see their true position when you want to place a piece. But at least the result is a nice clean transition.¬†Remember, as long as the player doesn’t see your garbage fire you can just pretend it doesn’t exist.World6ImplementedGIF.gif

So how would I improve this pipeline? Well I would start by improving the parallax script. If I had designed the parallax script to handle all the worlds at once, a lot of this irritation would be improved. Because then I could simply place the transition images where they need to be in the Scene Window and not have to switch between running the game to figure out the placement and then back to the Scene Window to position things correctly.

Secondly if I had fixed world lengths for each world I would be able to standardise the interval between each world’s images and thus be able to immediately place new world images by entering that interval into the Transform component’s X value.

Thirdly I could make the parallax script run in editor so that wherever the Scene window is looking at, the script will get that X value and parallax as if the camera was in that position. But once again this relies on there only object that handles the parallaxing.

Anyway I hope this this been an “fun” look at Kana Quest’s pipeline and hopefully it inspires you think about your pipeline and the inefficiencies built within it before you start production. Because that is one of the biggest mistakes I’ve made with Kana Quest. Ensuring quick and easy implementation of things is something worth spending a fair amount of time to work out. If you don’t get it sorted it can and will cost you days, weeks and even months of development time. And if you are really careless, you could end up writing a Dev-Blog about “The World’s Most Irritating Jigsaw”.

Until next time, have a great week.

Advertisements