Rookie Awards 2024 - Open for Entries!
Open The Temple
Share

Open The Temple

by Archie3233 on 7 Apr 2022

Open The Temple is an adventure game where the player explores a jungle searching for artefacts belonging to the mysterious temple.

0 868 0
Round of applause for our sponsors

Open The Temple

Open The Temple was my first personal project with CG Spectum. The goal of this project was to create an experience where the player can explore a beautifully designed world to un-ravel the mystery of the locked temple.

Game Features

Objective System

The objective system consists of two C++ classes; an Objective World Subsystem class, and an Objective Component class. The Objective World Subsystem class contains the functionality to create, update, display and remove an objective. Each objective is an instance of the objective component class, the objective properties are stored here and can be accessed through getter functions.

Add & Remove functionality

The objective world subsystem adds a new objective to the world by storing it in an array. From here, it can be tracked and displayed. An objective can also be removed from the array.

Objective State Change

"SetState" is a function belonging to the Objective Component class. This function broadcasts an event to alert the world subsystem that the objective state has changed, passing across the new state.

Player Movement

The player movement in Open The Temple uses a custom Character class (inheriting from "ACharacter") to bind the player inputs to player control functions. The character also controls when to initiate camera shake, and when to play sounds. 

Player input binding

Player action and axis inputs are detected within Unreal Engine. These input events are bound in C++ within the "SetupPlayerInputComponent" function to an appropriate custom function which handles the player input.

Movement

The "MoveForward" and "MoveRight" functions add movement to the player, using a pre-made Unreal Engine function called "AddMovementInput". Behind the scenes, this pre-made function is adding force to the player in the specified direction.

Artefact Interaction

The artefact collection system is driven by collision detection. The artefact class has it's own collider to create the "interaction range". The player class has a reference to an available artefact which is populated when entering an interaction range collider, or cleared when exiting. This reference is used to identify if the player is in range of an artefact and if so, which specific artefact to pick up. 

The Interaction UI visibility is toggled when an artefact detects the player entering or leaving.

I tried to refine the artefact collection system by using a ray trace to check if the player is in range of an artefact and looking at it, however I felt that using collisions instead created a more polished experience for the player in this project. Due to the artefacts being small, it was difficult for the player to look directly at an artefact so for this reason, collisions felt more reliable.

Full C++ classes

Have a look at these Git Hub Gist repositories to view the full class code from the examples above.

Objective World Subsystem

Objective Component

Player Movement

Other

Assets Used

Ancient Temple, Jungle Pack, Rock Sounds Pack, Footsteps Sound Pack Six, Luos's Eight Elements, Ancient Treasures, Animal Variety Pack

Software Used

Unreal Engine 4.26, Rider for Unreal Engine

Time Estimate

1.5 months



Comments (0)

This project doesn't have any comments yet.