This project is called: "Color Blind".
I made use of the following tools: Unity3D, C#, Visual Studios, Classes, GUI, RenderTextures, Raycast, Post Processing Behaviour, UI, Shaders, Rigidbody physics.
In this project I worked together with an developer, Bosko Ivkovic and four artists.

The concept of the game is that all the colors in the world have disappeared. You have to get them back by collecting color. Collecting these color unlocks abilities and different ways for you to complete puzzels and get past obstacles.

This is the homescreen of the game.
This is a video of an entire playthrough
The first feature that I made was a flashlight that would show color in a black and white world on the places it shines on.
Left: color flashlight off. Right: color flashlight on.
To create the black and white effect I simply gave the main camera of the player a Post Processing Behaviour with a custom LUT that has a black and white adjustment layer on top of it.

To get the circular shaped colored effect I had to place a second camera at the same transform as the black and white camera. The Target Texture of the camera had to be a render texture. I used that render texture on a custom masked material as the Main Texture that uses a shader which original purpose was to display mini-maps. As Mask Texture I used a black and white circle with smooth outlines to make sure the colors would only show in the center of the screen to make it look like only a beam of light is being casted.

To make the colored layer visible I had two options. For the first option I could draw it as GUI, but that would cause the issue that it would aways be drawn last each frame. That means that it the colored circle would be placed on top of everything, so even the UI like the pauze menu. The second option was to use a canvas with a Image and set the Material to our custom masked material.

By scripting I would toggle the Image on and off to make the colors show and disappear.
I did this using two scripts, one monobehaviour script on the player and one class.
This is the monobehaviour script that controlls if the flashlight should be on or off.
The class is contructed in the start function.
In de update function it checks if you have obtained your flashlight, if you have it will check a few things to see if what happens to your flashlight.
If your light is on and you press the button the light will turn off.
If you press the button and the light is off, the light will turn on.
As long as your light is turned on your batterylife will drain.
If the batterylife more is than the max it will be set to the max again.
The batterylife can't go bellow zero.
If you are out of batterylife the light will automatically turn off.
It also adjusts a slider in the player UI thats let you see how much batterylife you have left. (This slider can be seen in the top right corners of the screenshot displaying the colors)
This is the classed used for the flashlight.
This class controlls everything what happens to the flashlight by the following functions.
Turning it off by disabling the UI image that displays the colors.
Turning it on by enabling the UI image that displays the colors.
Draining the batterylife by a set amount everysecond.
Cap the batterylife to the max.
Add batterylife when you touch a pickup.
The next  feature made was an options menu.
This is how the pauze menu looks.
The options menu pauzes the game completely.
It contains the following features, toggling full screen, toggling audio on/off, restarting the current level and returning to the main menu.
This script is on top of the player and enables the pauze menu.
By pressing the Escape button the menu opens en closes.
The MenuOpen() en MenuClose() functions disablen and enablen all things like timescale and playermovement.
The following functions are bound to buttons on the option menu.
Dis/enabling fullscreen, muting/unmuting all audio, restarting the level and returning to main menu.
The following function I made gave the player the ability to grab and throw objects.
For this function I used raycast.
This is the script that allows you to grab certain objects. This script is a part of the player.
Every important line of code in this script has the functionality explained behind of it.
The script calls functions from the following class.
This is a class with function that controls the behaviour of throwable objects.
The first function picks up the cube. The gravity is disabled to prevent the object from dropping, it stops detecting collisions so that it will keep moving along with the player, it sets the velocity to 0 so it will not fly of to space because of his velocity and angular velocity to 0 to prevent the object from rotating none stop.
ColorBlind
Published:

ColorBlind

Published: