Alien Intern VR


Specifics

  • Platform : Playstation 5(PSVR2)

  • Engine : Unreal Engine 5

  • Language( s ) : C++

  • Genre : Singleplayer, Casual, Simulator, Funny

  • My role : Lead Programmer


About the project

An unreleased PSVR2 game about getting a job to make your sleazy roommate Greg to move out. Whilst working you have to manage and overcome different modules in the form of work activities. This game was my second game project at Playground

My work

During the project I was responsible for the C++ side of our modules, that including module base classes and the Module Manager. More specific stuff like modules that needed their own backend was done by the person who was responsible for the actual module however.

I was also in charge of our games custom audio system which we needed because we wanted our audio to behave when we jump between VR and VR Inside of VR.

On the topic of VR I also made the VR Headset and the functionality to jump between your home and work enviroments.

Module Manager


The Module Manager takes an array of FSequenceModules which contains a pointer to the module and a timestamp of when it should be run.

In doing this we create a timeline of modules that is easy for the designers to work with since all they have to do is put in the a module reference and give it a timestamp.

The array the designers input are tossed into a small loop which constructs a new array that also takes into account how long the modules are. This lets us dynamically change the timeline based on if we want to play a tutorial before the actual module starts.

The manager is not run on tick, rather it starts a timer which ticks at a rate which the designers decide. On every timer tick it tries to start a module by comparing the current sequence time to that of the array. For performance reasons we break if our current time is smaller than the array element timestamp we currently are on since it would be redundant to continue checking the array.

This function also stops the entire manager if it reaches the given end time of the manager.

Module Base

Modules do not need to be started through a manager, they can be unhandled as well. This is useful when we do one off stuff like our initial tutorial.

Every module has an OnStartModule() event which is where we put our logic. All of the actual logic behind the modules are in blueprints and the C++ base class functions more like a shell so that they can all be handled equally by the manager.


Most of the base functionality in the module base is used to send events to tell the manager or itself where it is in its execution.