Elemental Rift

Elemental Rift is a 3D first-person puzzle/combat adventure game where the player has elemental powers based on 4 basic elements, air, water, fire, and earth.

Personal responsibility included Gameplay Programming for certain spell, resource management, environment interactability and Input management, GUI design and development, Lighting and Graphical Optimization(this was my research topic). All topics will be expanded on below.

Here is a gameplay video:

Gameplay Programming

Spells:

  • Fireball

fireball_2

Fireball is an AoE spell. The aiming is done by raycasting from the camera. A projector is used to show the spell decal at the point where the spell is being targeted. The decal is colored when the player has enough resources. As soon as the spell is cast, the distance between the target and the point of origin (which is just above the camera) is calculated and considering the fireball has a constant speed, the time to contact is calculated, that time used for the interpolation of the fireball meteors, entity management, and to time the after contact VFX. I was also responsible for making the VFX of this spell.

  • Telekinesis

telek

Telekinesis is a single target spell used to move these blocks around the environment. As the player starts the spell a ray is cast to check whether the object is eligible to be moved by telekinesis. If it is then the object’s gravity is disabled and vector direction is calculated to the 10 units away from the center of the camera from the objects current position. A force is applied to the object using that direction vector and the force is removed and the velocity of the object is brought to zero when it is with 2 units of the target area. At first, linear interpolation was used to move the object but it overrides the engine physics which caused weird collisions, which made me come to the solution to manipulating the force and velocity of the objects to solve the problem as they are a part of the physics of the engine. I was also responsible for making the VFX of this spell.

  • Rock Morph

rockmorph

This is a single target spell which also uses raycasting to target and checks if the object is applicable to this spell. It is a very straightforward spell where an entity is just replaced by another entity.  Rocks can be broken down to ruble, the rubble can be made into blocks and the blocks can be broken down back into rubble. The block which is made from rubble can be used with telekinesis.

  • Weld

weld

Weld spell is melee ranged spell and it simply produces a jet of flame which the player can use to weld/join certain platform in the world. This flame can also be used to light up torches present around the environment. The spell is basically a trigger collider present in front of the player and it activated when the spell is used.

Resource Management:

resource

One of the important parts of this game is resource management and how the player receives those resources had to be very clear and straightforward. The design was decided to be four different colors of cactus but with the same model so that the player could identify them as the source of resources. The make these cacti stand out from the surrounding vegetation, I decided to add a point light above these cacti with respect to their element color, a bloom effect is applied in post-processing which makes the top of the cacti brighten even more.
The actual detection of when the player is in range of a particular resource is done using a trigger collider.

Environment Interaction:

Here are some of the interactions with the environment. The top two images show the interactions with a torch. The player can use freeze to extinguish the torch and use weld to light it up. This is done by managing each torches state internally and changing depending upon the collider that triggers it respectively.

The bottom left image is a laser being deflected by a shield, it is done using a combination of raytracing and line renderer. Raytracing helps detect the points of contacts which are then used by the line renderer to render the laser. It uses a total of three points. If there is no reflection the second and the third point are the same as the second ray is not cast. If the initial ray detects an object which reflects the laser then a ray is cast after the angle calculation and the third point of the line renderer is actually the point where the second ray collides.

The bottom right image is a basic lock and key mechanism in the game using shape matching. The player just lifts up “the key” and uses it to activate “the lock”.

GUI:

wheel

This the basic overview of the GUI. Bottom left corner shows the amount of each resource present for each element respectively, red for fire, blue for water, green for earth and silver for air. The symbol below the bar shows the spell that has been selected by the player.
The spell wheel is used to select a spell, it is a radial wheel with the pointer in the center and a toolbox at the bottom of the wheel showing the name and cost of the highlighted spell. When the spell wheel is pulled up the game is paused.

dmg

The image above shows the damage GUI. When the player is hit a red splash appears and the camera also shakes to indicate that the player has taken damage. The health bar on the bottom right also blinks red and shows up only when the player’s health is less than maximum and disappears when it is maximum. When the player’s health a below 40 percent of maximum then a splash screen surrounds the screen until the health goes back up above 40 percent.

-Thank you for reading.
-Please feel free to contact if you want a playable build.