Saturday, March 12, 2016

InVivo's Audio Management Systems

The sound design in horror games plays a crucial part to the player's experience. Besides the visuals, audio is what makes the environment come to life.

At InVivo there are two sound categories which are distinguished, based on their functionality: ambience and all the various sound effects (SFX).

Ambience are all the environmental sounds, like the computer's screen buzzing, flickering lights, gas steams etc... that a player expects to hear inside an abandoned hospital, thus, creating an overall spooky feeling and immersing the player into the game.

The remaining SFX can be heard, when an action happens. These SFX include player footsteps, panel button sounds, padlock wheel rotations etc...

Since there are many SFX that are triggered in our game we had to come up with a solution to reuse audio game elements, instead of creating and destroying game objects at will. Using a technique called Object Pooling we created a bunch of sound game objects and used them when it's appropriate. Imagine having a bag of items, where you get an item when you need it, and you put it bag after use. Thus we avoid the constant creation and destruction of audio elements, which can have an overall performance increase.


Until next time...

Saturday, March 5, 2016

Behind Invivo's Narrative


In order for us to really make Invivo the immersive experience we envisioned it will be, we have spent countless hours dishing out some great ideas on what we'd really like the place to be.
Starting from the very first seconds, all the way to the ending credits, the world is a culmilation of hard work, expressing a unified vision, all  concluding in one single sentence: "This is really, really sick"!
During the pre-production phase, the task ahead seemed quite difficult, as we had to overcome the lack of any graphical representation and create an accurate pitch, for a story that could, in the end, be properly presented to the audience. Basic questions, like "who", "where" and "why" had to be answered in a cohesive manner, so as to facilitate both the narrative as a medium of expression and create the appropriate level of immersion to the player.
After all the core elements had been sketched out, we proceeded with creating the world in detail.
Along with the progression of level design and set dressing, we traversed the dark, twisted hospital corridors, rooms and laboratories,  giving birth to what would make everyone love - and hate -  to be engaged with the hospital and its story, by implementing every bit of our vision in such a manner, that it will be seemingly - and disturbingly - natural.

We hope that, when you get to experience what we really have in store for you, you will be as enthralled as we are!

Tuesday, February 9, 2016

InVivo’s AI Breakdown

In the InVivo Corporation’s hospital you are not alone. Mutated creatures hide inside the building and your goal is to avoid their deep breathing at all costs.

During the preproduction phase, when everybody was throwing crazy ideas about the game design, the monster behavior was one of the most fascinating topics. How the monsters interact with the world and what action they could perform at any given time, were the most essential issues we had to tackle.

Before setting up the main game, we created various prototype scenarios, where the monster could patrol, investigate and chase the player. This led to many hilarious situations, where the monster would walk through walls, completely ignore the player presence or throw him over the test level edges!

In inVivo, the monsters are capable of not only seeing the player but also hear his footsteps. Based on a viewing and a hearing distance, the monster AI chases or searches for the player’s position.

But how the monster changes its behavior? Using a finite state machine (FSM) the AI chooses the appropriate action based on player decisions and the environment. A finite state machine is composed by states, events and a set of transitions. For example some of the monster states are Patrolling, Investigating and Chasing. So at any given state, whenever an event occurs, if there is a transition leading from the current state to a new state corresponding to the event that occurred, the monster AI switches to the new state.


Have a look at the AI state diagram:



Most of the time, the monsters will patrol in the dark corridors of the InVivo’s hospital using a dynamic node system. But they will always be vigilant about the player presence. So when the monster hears something it will switch to investigation mode and if it spots the player it goes to chase mode.

In addition, the monster AI can interact with its surroundings and take the appropriate action. For example the monsters can open doors to enter a room, but also break them when they are in a hurry. This lead to a nerve wracking experience for our programmers, when the monster AI dragged along the door, instead of opening it with care!

The system is so flexible, so we can add more states to the FSM, keeping in mind to add the right transitions between states. If you are not careful this will lead to some strange visual bugs, where the monster opens a door, while having a walking animation!

Visually all we have to do is to switch to the appropriate animation clip, when we move between states. This is achieved using the Unity Mechanim Animation System.

And that’s how the monster AI comes into play in InVivo: Last Chance.