In the game GTFO developed by 10 Chambers there is a feature where you as a team need to complete a bioscan in order to open a door and progress.
Me and a gameplay designer decided to add further complexity to this mechanic by taking advantage of the terminal system already found within the game and implement extra features in order to increase the games difficulty and variety.
The Bioscan & Door
The door is programmed with features like serial-number, current state of bioscan as well as text elements for UX.
Implementing a zone where the player needs to be in in order for the scan to progress was achieved using a separate object and distance calculation.
Finally, for the door sliding a simple Translation Coroutine was used.
When making the terminal I divided my workflow into three steps:
The player firstly needs to be able to interact with the terminal. This was done using a simple player interaction script based on ray-casting. To be able to interact with the UI elements the players inputs need to be suppressed for movement and instead read by the terminal.
* Processing data
The second step of coding a working terminal is determining and dissecting the input. Below is a flowchart to represent the processing section of the code I wrote.
Finally the command input needs to be executed. This was written in a coroutine to easier deal with timed events and to achieve a satisfying displayed result in the form of a door opening and text updates in the terminal.