Highlighting of different kinds of objects.

Depending on what the target the companion moves to, it would either attack or interact.

Highlighting

To this, I made a system of highlighting objects when looking at them. Depending on what parent class the intractable object used, the actions of the companion would change.

Companion AI

Early in the project, the goal of the companion was supposed to be an intelligent AI that you gave commands to and it determines the best course of action.

Sadly, this was deemed too big for the project and was restructured to be more of a guide AI instead.

Details

Year of production: 2020 May to June.

Rules: Make a narrative game.

Time: Eight weeks.

Team size: ten.

Contribution

Unity

Shading

Lighting

Gameplay Programming

AI Programming

About

Experience a surreal world inside the mind of our character, while he travels and collects fragments of his memory, In this third person puzzle platformer.

 

Command

The companion would move to the object when commanded. When it got close enough, it would check what type of object it is going to interact with.

 

If it is an enemy (red highlight, sphere) it would attack. If it is an interactable object (blue highlight, button) it would interact with it.

Script

The system uses a highlightable object manager, which is a scriptable object. Each object that is highlightable would add itself to the manager, so it is completely separated from any other class.

The full detail of the classes and code is shown when pressing the button.

HighlightedObjectManager

The HighlightedObjectManager Is Scriptable Object that keeps track of all objects are highlighted.

The only functions it has is there to help the player class to determine which objects are closest to the middle of the screen and which isn't.


It also has a HighlightableRenderer Class that makes it easier to get info about the highlightable object and also its renderer, to be able to change the shader settings.

This is a ScriptableObject, since it doesn't need to be in the game world and also be able to hold data over different levels.

Highlightable

The Highlightable class has only two tasks and it is to add and remove itself from the HighlightedObjectManager.

This is only determined by if it's in the camera view or not.

InteractableBase

This is the parent class for all intractable objects.
It has a reference to a linked intractable object, in case it needs to change something on the linked object. An example is a button that moves an elevator.

In the future, this linked object would be in a child class, since all objects don't need to change something else.

Button

This is an prototype of a button to demonstrate the use of the classes to the other group members.

In the end, this was scrapped since the companion was not gonna interact with anything.

Enemy

This is the same, but with an enemy instead. It has a basic movement AI and a way to attack the player.

It was also scrapped.

Demonstration of the dialogues with voice overs.

Script

The full detail of the classes and code is shown when pressing the button.

Fragment_DialogueObject.png

Crystal shard with two different dialogue scripts that trigger at the start and the end of the image it displays.

UI

Dialogue triggers can be added to objects or volumes in different ways, using a DialogueTrigger base class.

 

Dialogue System

We needed a good way to display the narrative in the game, so I got to do a dialogue reader. This was iterated several times and gone through different designs throughout the project.

Fragment_DialogueScriptable.png

The conversation scriptable object.

Conversation

Scriptable

I setup the conversations between the characters as a scriptable object, which gets attached to a dialogue trigger.


Since voice over got added pretty late in the production, I had to find a good quick solution for the designers to tweak the timing of fade and time on screen. This is to be able to time it with the voice lines.

DialogueReader

The DialogueReader class reads all the text that gets sent to it and displays it on the UI elements in the level.

It loops through all dialogues on the conversation List until all of them are read. This is a MonoBehaviour and needs to be added to all levels.

DialogueTriggerBase

This is the parent class for all Dialogue triggers. The only thing that needs to be done to get the child running is to run the TriggerDialogue() and it runs correctly on any volume or object trigger.

When triggered it will add itself to the DialogueReader list of dialogues that are going to be read.

ConversationScriptable

This is the Scriptable Object that keeps track on what dialogue is going to be read, by whom and the timing of all the different dialogue texts.

DialogueText

The DialogueText class keeps track of how the dialogue is rendered on the UI text objects.

 

Lighting

In this project the artists had too much to do with set dressing, animations, etc. so I stepped in and did lighting for the game.

The Light concepts that the 2D artists were pretty detailed, this made so I could do all of them fairly quickly, in about two days.

Concept

Result

Level 02

I wanted the direct light to rotate, to give an eerie feeling and make it unique beside the colors.

Level 02

LevelTwo_Concept.png

Level 03

The red light changed to come from the crystals. The roof is also open to give a moon light feel.

Level 01

LevelOne_Concept.jpg

Level 01

Fragment_Lighting01.jpg

The only thing added to the concept is black particles, which exist on all levels.

Level 03

LevelThree_Concept.jpg
Fragment_DissolveShader_01.jpg

Shading Network Part 01.

Fragment_DissolveShader_02.jpg

Shading Network Part 02.

Shader Graph

We used the HD render pipeline which allowed us to work in Unity's shader graph. And from there I exposed parameters that was used in a DissolveDoor class to control when to open and close.

 

In Editor Demonstration.

Dissolve Shader

This shader is used for opening doors in the game. This was attached to a door object which opened up when the player hit the red button with the laser.

This was also supposed to be used for enemies, which sadly had to be removed to be done in time.

Fragment_ComanionHairShader.png

Shading Network.

Shader Graph

We had a lot of trouble with getting the hair textures to render in a correct way.

 

We tried some different surface types and settings for the shader, but ultimately we settled for a glow look to which gave a nice friendly look to the companion and also hid some of the artifacts we got from the hair cards.

Hair Shader

Since the 3D artist, Sandy, that made the model didn't have any prior knowledge of Unity's shading network, we sat down together and determined the settings for the hair shader used.

I did all the technical work, while she directed me on what art style to go for and what she needed of the shader.

Hair Demonstration.