DEVLOG#30 – Irritating Implementation of Platforming Predicament, Part IV: Shader

Oh hello there, guys! Here already? Come on in! There are pictures to feast on and stories to savor, so pick a comfortable place to sit and eat well.

Haven’t I introduced myself yet? Well, if you follow this blog from the beginning, you surely must know that I am Chalcedony, one of the programmers of Ascender. Well you know what – now I’m not an intern anymore in devlogging – I am a full-fledged one!

Here we go, the appetizer: sneak peeks! The never-ever-seen-before scenes are ready for your eyes only! [*Plays awesome sound effect*]

Firstly, we have the tendrils. Sky can jump on and off it. Note how they react accordingly to sky’s movement.

Do the villagers climb on them too?

This kind of trampoline is also fun for some boing-boing. Hold the jump button for more air time.

Trampoline image just for placeholder.

How defying gravity sounds? You can climb wall and even fall into the horizon.

The house is still in repair, no worries.

For today’s special, we serve shaders. What is a shader, you ask? Wikipedia says “a program that tells a computer how to draw something in a specific and unique way”. Shader is used for special (and not-so-special) effects, like these.

Remember this big robot? His laser effect was my first shader creation (not counting failures, of course)!

The rune stays intact, so why sky does not?

The layer where sky is standing is affected by the light from the lamp, whereas the background and the foreground are not. Just shader.

Villagers have nothing to do, so they spend the whole day standing there.

Even simple menus need shader to clip the items so they are not rendered off-window.

Why so many tasks for so little robot?

Look closely, the water distorts the scenery behind it. How to do it? Shader.

It distorts my sanity too.

Contrast to C# in terms of language, one should use Cg/HLSL language when creating shader in Unity. The scripts below both are for B.RO, the left one is written in C# for controlling the movement, and the right one is in Cg for you know, shading.

These are among the first scripts for this game! Bad, bad scripts.

 Those two look alike, but in truth are quite huge in difference! Debugging is especially a hell in shading. You will often end up with this kind of result…

Error in shader equals magenta for you. My favorite color!

Of course without you knowing what’s wrong. For some cases, Unity will be a good guy and tell you (approximately) which line caused the shader into haywire. Granted, I am by no means a master in shading, but still, when you went to fix the line, then it goes boom…

Very menacing water.

Gah! Dealing with these stuffs always drives me to my boiling point!

Anyway, that’s all for today’s meal! Did you enjoyed it? What now, you need dessert too? If you are still craving for more, be sure to play our public preview now, and let us know what’s on your mind!

Wow, it’s been ages since my last post, but now we must apart once more. Fret not, we will prepare more special dishes for you to relish, so stay tuned, and eat well. Bye!


Leave a Reply

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

You are commenting using your 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