Chainsaw House VR

Chainsaw House is a VR horror game inspired by Hideo Kojima’s PT.

It was created using Unreal Engine and C++.

What I learned/used while making Chainsaw House:

Click a line of text to see how it was used in the making of Chainsaw House!

  • Quaternions

  • State Machines

  • Float Curves: interpolation, distribution (62 used in total)

  • Animation Blueprints

  • Inverse Kinematics

  • Animation Montages

  • Animation Notifies

  • Linear Interpolations

  • Vector Projection

  • Component based systems

  • Grayboxing

  • Starting simple to create better foundations to add complexity to.

  • Functional Decomposition

  • Skeletal Mesh Dismemberment

  • One / Two handed VR grab system

  • VR Hand Animation Pipeline

  • Fake light reflection: Dog eyes

  • Fake audio bounce: Radio

  • Audio Crossfader

  • Non Euclidian Geometry trick CHEAP (with audio/indirect light fading with door close/open for seamless transition)

  • Complex Geometry traversal: Cockroaches

  • Unreal Engine UI Widgets

  • OOP Principles

  • DRY code

  • Clean code

  • Polymorphic systems (grabable, scare, stage)

  • LODs

  • Instanced Static Meshes

  • Precomputed Visibility (and override volumes)

  • Precomputed Lighting Scenarios: Light / Dark house

  • Nav Mesh (A* / Theta*)

  • Flank System for Nav Mesh

  • Engine Audio System (saw engine)

  • Custom recorded saw rev system (same concept could be used for better cockroach movement)

  • Peek system

  • Haunt System

  • Animation Blendspaces

  • AI Flank system

  • Dot products

  • Cross products

  • Layered animation

PT Cover made by 7780s Studio that I based my cover on

Quaternions

Used for Cockroach rotations as well as any rotation needed to be created from a vector projection. Any time an FRotator (euler angles) would give gimbal lock, I would use a quaternion. I used Quaternions whenever possible for rotations except when it was much more convenient to use FRotators. Quaternions are more performant than FRotators and performance is critical in game programming. This especially important for VR when I need to keep a minimum stable framerate of 90fps or 11ms.

State Machines

These were used in almost every system in Chainsaw house with varying levels of complexity from a simple On/Off bool on the flashlight to several State structs used by the main enemy AI character. They provide a layer of abstraction that makes things easier to work with. The model I used for state machines is from https://gameprogrammingpatterns.com/state.html.

Basically, a state consists of 3 main functions:

EnterState

TickState

ExitState

The actor that owns the state machine keeps track of its current state and can also call ChangeState(NewState) which is essentially:

ChangeState(NewState) {

    ExitState(CurrentState)

    EnterState(NewState)

}

Float Curves

Useful for smoothly animating things like doors opening/closing or distributions for floats.

For example: I used a float curve for calculating the swing velocity when a door is hit by the player hand, player capsule, or a thrown object. If it is hit on the end near the knob, the velocity is X, but when it is hit in the middle, the swing velocity is slower than 0.5X (which is what it would be if I were to calculate it based on 2D distance from the door hinge).

I also used a float curve for random number distribution with cockroach laziness, swerve speed, and move speed. So for move speed: very rarely, the cockroach will move very fast, or very slow.

Animation Blueprints

Uses a blueprint state machine system. The most complex Animation Blueprints were for the main enemy AI, Dog, HandController, and Cockroaches.

I used anim notifies, inverse kinematics, and montages as well.

The section below is deprecated but kept for my own amusement.

C.H. is an innovative, psychological/survival horror experience being made for VR platforms using Unreal Engine.

It is aimed to be the scariest game of all time.

 

The Making of C.H.

Game mechanics are coded by me.

Contractors are hired to create models and animations for the game.

Design Principles

Each piece of C.H. is designed meticulously with perfection in mind.

Fun and innovation is the end goal.

Dev Principles

  • Quickly implement, then polish.

  • Any implementation has tradeoffs, best to reason thoughtfully but not get caught up on one feature. If I’m stuck, work on something else and the answer will come with time.

Innovation

  • Sprint mechanics force the user to use real running motion to help combat motion sickness. This inherently makes the game more immersive and intense.

  • I can’t think of a VR horror game that is truly UNHINGED! I’m talking PT jumpscares but in VR.

  • VR Chainsaw.

  • VR Chase mechanics.

  • Peek mechanics.

  • Most AAA games seem to be made to raise shareholder profit. My game is made to be FUN!

 

Previous
Previous

Multiplayer Shooter for Oculus Quest (Competitive Shooter: Grave Objective)

Next
Next

Cosmic Spike