friday the 13th! Wasnt unlucky at all

Posted by (twitter: @@TheCodeTroll)
July 13th, 2012 12:32 pm

Well, today has been great really.
Grant made some more levels (he is extremely sadistic and thinks you should all burn in his level hell)
They are pretty difficult but they incorporate the new mechanics pretty well :)
New blocks are: the crumble block, you can only roll on it once! then it falls appart (will change gphx soon)
Confusion block, swaps left and right around.

I finally thought of a not so hard way to make the background transition a little better!
Took me a little while to play around and implement it, was pretty cool in the end.

I construct a 4 vert plane in code (because Unity’s plane has 121 verts!)
Construct its vert positions vert UV’s and its normals.
I apply a gradient material :

And then set up the UV coords of the plane so that, if the level starts white, all 4 UV coords are along the bottom,
and if the level starts black the UV coords are along the top.

When you press space to change the colour, the UV’s lerp from one set of vector2’s to the other! 😀

It was seriously god fun implementing and finally getting it working! :)

Have a play around
(only the flattened version is current) 

5 Responses to “friday the 13th! Wasnt unlucky at all”

  1. Nsmurf says:

    Nice! the gradient is good!

    One quick question about unity:

    Did you need to buy it, or are you using the trial version. I’m thinking about using unity instead of Blender game engine, but i don’t have much money to spare.

  2. TheCodeTroll says:

    I can vouch for it being incredibly easy to get into using, this being my first real stab at a project, and I’ve done all this in 4 days! :)

  3. the3rdc says:

    This game is so addicting! I love it!

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]