Unofficial OVRLipSync Plugin for UE4

 

(This is now obsolete, Oculus has released their official version, get it here: https://developer.oculus.com/documentation/audiosdk/latest/concepts/book-audio-ovrlipsync-unreal/)

 

After messing with PocketSphinx’s phoneme recognition and not getting the results I wanted, I looked back into porting Oculus’ LipSync plugin for Unity over to UE4, since the Unity plugin is just a wrapper for a DLL and some examples of how to use it.
I’m happy to report that I’ve got a basic version of the OVRLipSync plugin working in UE4, and it’s ready for people to use. I’ve gone ahead and made an example project to show how to use the UE4 version of the plugin (quite straightforward, see example images below). The project has an example mesh to see it in action, and should work out of the box:

Example Project + Plugin Repo:
https://github.com/ChairGraveyard/ovrlipsync-example

Plugin Only Repo:
https://github.com/ChairGraveyard/ovrlipsync-ue4

For those that just want a quick rundown on how to use it without downloading the example project, here are some screenshots of the VisemeGenerationActor derived blueprint class.

VisemeGeneratActor event graph setup:

SetMorphTargets function:

MorphIdxToNames array:

As long as the mesh has the appropriate morphs as listed above, it will work decently well. I’m sure there are things I’m doing wrong, and bug reports are welcome!

Floating Hands: Good Riddance

I never liked the idea of floating hands, and now that I’m no longer trying to get a dev kit from HTC/Valve (they expressed interest in mini-games with low replay value and minimal content, the opposite of what Dungeon Survival is aiming for), I’m doing away with them entirely in favor of the true-first-person I always intended to provide, and was going to end up being an option if floating-hands had stayed.

With an inverse kinematic solution that’s more robust than the generic CCD/tw0-bone IK provided out of the box by most engines, and which also features constraints, the “elbow problem” which prompted Oculus and Valve to so vehemently recommend against true-first-person avatar bodies simply doesn’t exist, so the argument for floating hands crumbles.

For fans of floating hands rather than a tracked, full body avatar (why!?), they may come back as an option post release.

Work in progress Automatic Lip Sync

This is a quick test of the first hackish pass at doing automatic lip sync based on phoneme recognition from PocketSphinx.

I had reluctantly set the idea aside due to poor results reported by UE4 forum user ShaneC, who wrote a nice wrapper for PocketSphinx as a plugin. After some fiddling around and much searching of usergroups about Sphinx, I was able to determine that passing in a blank option for the phoneme recognition file makes it work pretty reliably for some reason.
Playback of the visemes is a bit choppy right now for a number of reasons, mostly to do with just because it hasn’t had a pass to make it look nice, and because I’m not passing through the information about how long each phoneme lasts.

Needless to say this is completely pre-alpha and doesn’t represent the final result, just an extremely early first test.

Demonstrating Dynamic Pickup Objects in Dungeon Survival (Quick Video)

Hey guys, this is a quick video I did to demonstrate how the physics objects and picking them up will work in Dungeon Survival, which also plays into combat.

I’ve been working with physics engines, including implementing them from scratch into commercial game engines and doing complex physics implementations for about 7 years now. One thing I, like every other VR enthusiast, realized, is that without the haptic feedback of a real sword you’d need to do something special, and specifically different than the kinematic attachment you normally see, e.g., it’s bolted onto your hand or whatnot, and has essentially infinite mass – can move anything, regardless of how heavy, in order to get that feeling of weight.

To that end I wanted to test a method of letting the objects you pick up, including weapons, still be dynamic (e.g., can be moved by other physics objects in the simulation, and can’t move infinite mass).

Without further adieu, here’s the video:

 

YouTube version: https://www.youtube.com/watch?v=mYw-e0qTJkA

Please note this is pre-alpha footage, and does not represent the final state of anything featured!

Notice that when I hit small objects with low mass, like the mug and basket, they are easily moved with the sword, which is of a similar mass.

The table, by contrast, blocks the sword and moves it as I swing (as hard as I reasonably can).

In Dungeon Survival, you’ll need to be aware of your surroundings, as your weapon may be caught in obstructions, blocked/moved away by an opponent, or knocked out of your hand outright!

Belated Screenshot Saturday – Dungeon Survival

dungeonsurvival_interiorcabin_overworld

About Dungeon Survival

Features Overview

  • Made from the ground up for VR, with unique features to support motion controls
  • Next-gen VR features today: Voice-input commands, NPC facial morphs and more.
  • Co-op multiplayer (at least 2-4 players, maybe more unofficially supported)
  • Streaming, no-load-screens transitions between levels of the dungeon
  • True First Person (you can see the character’s body, including animations)
  • Deep Item System – Fire burns things, water douses them, etc. – generalized gameplay that layers up to produce complex interactions
  • Real-time Physics Interactions and Combat – Items are physics based as in games like Skyrim, combat is based on physical collisions – if you see a hit – you hit!
  • Environment Interaction Over Hack ‘n’ Slash – Use your wits to overcome the dungeon’s deadly foes and traps! Ingenuity is rewarded over blunt force.
  • A Customizable Experience – Want hardcore roguelike style gameplay with permadeath? Or would you rather have a more Skyrim-style experience? You choose!
  • Modding Support – Via both configuration file editing (recombine base gameplay of items/monsters with new looks and combinations of behaviors) and advanced modding through the UE4 engine. Modding means for a replayable experience you can keep coming back to for years to come.


About The (VR) Dungeon Survival Project

The (VR) Dungeon Survival Project is a game built out of my desire to make something that captures the magic of deep item and environment interaction gameplay of roguelikes, on top of a foundation of survival and real time gameplay.

In addition, the game is my experiment into VR and supporting novel input devices for more interactive, fine-grained gameplay. What this means is that ultimately Dungeon Survival will support setups that allow the player to play with natural input, such as grasping and manipulating objects with the HTC Vive controllers.

Mod support is also very important to me, as I fully understand that mods are the key to longevity of games of this sort. Most things will be able to be tweaked or added to without any tools other than a text editor, but advanced functionality will require downloading a mod pack with source files for the game, and getting access to Unreal Engine 4.

Left 4 Dead 2 Style Wound System Complete (Mostly)

Great news!

The Left 4 Dead 2 style wound and dismemberment system mentioned previously, which will be powering the gruesome world of Dungeon Survival, has now been completed (save for a couple of odds and ends, and art assets).

Previous screenshots were taken using a hacky method of transforming the hit location into mesh-relative coordinates, whereas the proper way of doing it, and really the only way that truly works, is to use the “pre-skin” vertex positions.

For non-developers this essentially means getting at the points that make up the character mesh before they’re transformed by the animation rig.

The effect of this is that the opacity-mask sphere which creates the “hole” in the character mesh so that the wound geometry shows through will follow along with any animation properly.

This meant diving into the guts of Unreal Engine 4’s material system, right down into the proto-shader files that underlie familiar visual node-based materials. Luckily this ended up being quite painless!

Remaining work to be done on the wound system itself is to use a blood mask to dirty-up the edges of the character mesh where it’s hidden by the wound-ellipse.

Other than that, all that remains is to create wound meshes for the characters and hook up and tune the system.

As an aside, I decided to work on this today because work on motion controller IK has stopped for the moment while the new full-body IK with limits plugin is debugged a bit by its author for my use case.

I can’t wait to show off some of the gameplay with the new full body IK and motion controls, as it’s something you don’t often see outside of triple-A games that use software like Havok Behavior or Autodesk HumanIK, and is perfectly suited to VR avatareneering..

Storyteller – Fireside Tales Beta 2 Released

 

The new version of Storyteller brings it to Unreal Engine 4.10 and the 0.8 Oculus Runtime, greatly overhauls the environment and object graphics, adds the option for SSAO, new animated books, new artwork and maps. The camera will also now function while using mouse and keyboard and not in the VR mode.

In addition to to many small tweaks and updates, the selection of built in audiobooks has been improved.

And finally audibook files are now in a more convenient location (Content\Audiobooks) rather than with the game exe.

 
Get it here:
https://storyteller-vr.com/storyteller-fireside-tales/

Update: Left4Dead2 Style Wounds for Unreal Engine 4

Quick update to my L4D2 style wound implementation for Unreal Engine 4 – I’ve managed to get the wound hit point to follow the animation properly for characters. This was the main thing holding me up from continuing work on this system (namely, extending it to use a capsule instead of a sphere).

An example download is available here: https://forums.unrealengine.com/showthread.php?90474-WIP-Dynamic-Left-4-Dead-2-Style-Wounds-Dismemberment

For those that want to incorporate the new changes I’ve made, here are two screenshots showing the main pieces of code you need to implement (and the modified code for determining the sphere location).

First is in the character blueprint – this is showing the new way to transform the socket location into skeletal-mesh-relative-coordinate-space (that’s a mouthful):

Next up is the material itself. First set your Material domain to Masked, then replicate the part that plugs into Opacity Mask:

 

 

Grass Bending Test

Note: The following video is pre-alpha test footage, and in no way represents the quality of the final game.

It’s hard to see due to the video framerate and compression, but there are volumes for affecting the grass parented to the player’s feet.

Credit for the effect goes to Daniel Wenograd.

To add this to your own Unreal Engine 4 project, check out Daniel Wenograd’s post on the UE4 forums.

Storyteller – Fireside Tales featured in Vice article about Tripping in the Rift

Connington’s first VR trip was closer to what you’d typically do after taking shrooms. After donning the Rift headset, he was sitting in a cave around a crackling campfire listening to an old man reading George Martin’s A Song of Ice and Fire (the series that became Game of Thrones). The simulation, Storyteller – Fireside Tales, is an immersive audio book that makes it feel like the story’s being told by someone sitting next to you.

“The echoing of the old man’s voice through the cave, the dripping of the water behind me, and the warmth of the fire in front were so intense and real that I felt like I could reach out and touch them,” Connington says.

“I had left my student life behind and become part of the ASOIAF world, feeling like Hodor could walk in at any moment.” he says. “I started to dream I was Bran, stuck in a cave somewhere North of the Wall.”

Screen Shot 2015-11-18 at 11.46.09 AM.png

Image: Oculus Rift simulation Storyteller – Fireside Tales

Read more: http://motherboard.vice.com/read/real-drugs-virtual-reality-meet-the-psychonauts-tripping-in-the-rift

Thanks to Motherboard/Vice and Jon Connington for the shoutout!

Exponential Squared Fog for Unreal Engine 4

While upgrading versions on DotCam and TK-Master’s Ocean plugin I realized while there are some underwater camera effects in the new version, there isn’t any fog effect, and having previously run into the limitation of a single Exponential Height Fog actor per level in UE4, I realized I would need to buckle down and write a fog shader myself. Not hard, of course, but there are a couple of tricks that should save time and hair pulling.

First, let’s see how the current underwater shader effect in the example level looks:

Not bad – the animated 4-Way Chaos setup combined with the wavy normal map does an admiral job at simulating the effect of looking through clear water.

But what if your ocean has a high amount of plankton, or other debris?

Something like the above is a bit more suited.

To replicate this, create a new material and set it to be a Post Process type.

Then recreate this node layout:

The code for the custom node (ExponentialDepthFog, in the image) is very simple:


 

// Get the distance from scene depth
float dist = length(pixelDist);
float fogFactor = 0;

// Compute our fog lerp factor
fogFactor = exp( -pow(dist * fogDensity, 2));
fogFactor = saturate(1 - fogFactor);

// Lerp between fog and scene color.
return lerp(sceneColor, fogColor, fogFactor );

Once you’ve created the material, add it to your underwater PostProcessVolume under the blendables section.

Quick and Dirty Razer Hydra Support in UE4 Blueprint

Edit: To use the calibration feature, stand in a t-pose (arms at shoulder level extended to either side) and press the calibration button (start by default).

It doesn’t matter what pose your character is in during calibration as long as they are generally standing.

Many thanks to Getnamo for his Razer Hydra (info and download) plugin and excellent help figuring out how to set this up (more detail about calculations). I was definitely overcomplicating things.

Copy the Hydra Plugin into your project dir and enable it in the Plugins menus, restart.

Make a new BP derived from HydraPlayerController. I called mine DHydraPlayerController, D being for Dungeon (Survival).

Go to World Settings and set the game mode override settings to use your HydraPlayerController BP you just made.

GameMode Override settings for Hydra player controller.

GameMode Override settings for Hydra player controller.

Event graph for Hydra player controller.

This is in the Hydra player controller. Notice the variables there and the function Calibrate Hydra (I use start, easy to find on the controller). The base offset one is just a static 40 in Z, it doesn’t change. I could use a float but I plan on doing a more thorough calibration step in the future to get more exact mappings, so I’m leaving it as a vector for now. The midpoint we calculate.

Event graph for Hydra player controller.

Event graph for Hydra player controller.

Next comes the Calibrate function, also in the controller:

Calibrate function in Hydra player controller.

Calibrate function in Hydra player controller.

Next we’re going into the character’s animation blueprint

Open your character's animation Blueprint.

Open your character’s animation Blueprint.

First, add these variables

Character anim Blueprint variables.

Character anim Blueprint variables.

Then create this (looks messy but is simple). Pull off the character node to get the controller.

Set positions in the animation Blueprint event graph. Pull from the character node to get the Controller.

Set positions in the animation Blueprint event graph. Pull from the character node to get the Controller.

The last step is to set up something like this in the AnimGraph. Ignore the wiring that goes off screen, it’s just doing a static rotation to fix the default hands for my particular character.

Set up the hand IK using the animation blueprint variables from before.

Set up the hand IK using the animation blueprint variables from before.

I’m using component space for the IK target positions.

I’ll be porting this in a more polished state into the VR Game Templates by Mitch (of Team Metatron).

Last Night’s Progress

So my Razer Hydra arrived and I spent a little bit of time trying to set it up via Getnamo’s Razer Hydra plugin for UE4, which is awesome! I was able to quickly get it passing values into the game.

The problem lies in transforming the controller position from base-station-relative space to the game’s world space (or the character’s local/component space, even).

After toying with it for a bit I could get it to almost work, but for now I’m setting that aside until Mrob76u, author of the Ultima Underworld VR Remake can share his setup.

I got back to working on the base gameplay and made some decent progress.

Progress towards the gameplay video:

  • Health, damage, and death for the rats
  • Crushing/impact damage for the rats so that the player jumping onto them causes damage
  • Rats spawn a rat corpse item that the player can pickup (and eat), on death
  • Rats take damage from fire
  • Fixed a couple of misc. bugs
  • Fixed throwing force so that throwing a torch is satisfying

Here’s the list of remaining stuff to do from last time, some of which I’ll hopefully get to tonight.

  • Kick attack for the player
  • Two-handed pickup animation and code setup for the player (to throw barrels)
  • Creating a “flee” state for the AI, so that rats that have been attacking run away faster than the normal walk speed
  • Setting up flee mode so that cowardly/non-aggressive rats will skitter away when the player nears
  • Blood effects on damage for the rat attacks, and also when the rats are damaged
  • Hunger/starvation code and an eating AI for the rats.

Quick Update – Progress Towards Gameplay Demonstration Video

Since the weekend I’ve been making rapid progress on the rat enemy and its AI behavior.

Here’s what was done yesterday:

  • Implemented rat attack routines
  • Set up jump and lunge forward functionality for attack
  • Jump bite animation during attack
  • Cowardice and aggression system – some rats will not attack, or will attack and run away
  • Dealing damage reduces aggression (taking damage will increase cowardice, but that’s not in yet) so that rats do surprise attacks and skitter away

Progress is steady towards the state I’d like it in for the gameplay demonstration video, but there’s still a lot to do, including:

  • Health, damage, and death for the rats
  • Kick attack for the player
  • Two-handed pickup animation and code setup for the player (to throw barrels)
  • Creating a “flee” state for the AI, so that rats that have been attacking run away faster than the normal walk speed
  • Setting up flee mode so that cowardly/non-aggressive rats will skitter away when the player nears
  • Blood effects on damage for the rat attacks, and also when the rats are damaged
  • Crushing/impact damage for the rats so that the player jumping onto them causes damage
  • Hunger/starvation code and an eating AI for the rats.

Once that list is done, I’ll be moving on to work on expanding the level, adding more items, and some traps. The level and traps work will complete the features I want to have for the video I plan to make.

I estimate 1-3 weeks for those features, depending on setbacks or delays.

As an aside, my Razer Hydra arrived from eBay today, so I’ll be jumping into making that work in the game at some point soon.

On Networking Destructibles in UE4

One gameplay mechanic (which will be expanded more as time goes on, into a generic system for flammable items) currently in Dungeon Survival is a destructible barrel ‘filled with’ (spawns) oil.

This uses UE4‘s built in NVIDIA APEX Destruction.

As any UE4 dev that has played around with destructibles will know, the actual destruction event doesn’t network “automatically” in any way – even if damage or collision events are.

That presents a problem.

What happens currently – you can enable movement replication on the destructible actor. This works well (probably not as well over the network), all the way up until the thing breaks, at which point the oil spill is placed in a totally different spot on the client and server.

Now I should point out that technically, my destructible barrel isn’t using the destruction system the “right way”. For something like a barrel which you want to accumulate damage and break, there is a built in impact system. Unfortunately, I was not able to tune that to act how I wanted – a predictable amount of hits to fracture the barrel.

So right now instead the barrel is set to generate hit events. I check to see how strong the hit was, and if it’s over a certain threshold, I apply some damage to the barrel, which is set to fracture if a certain amount of accumulated damage is ever applied.

Because of this particular setup, the way to network it is quite clear – handle not only the damage, but also the fracture event and spawning the oil slick on the server, replicated to the client.

In this fashion the server will determine where exactly the spill is placed, even if the client’s destructible fractured in a slightly different position.

I’ll be updating this post later with screenshots demonstrating the problem, though for now fixing it is a Backlogged task.

Quick Update – I’ll Let Trello Do the Talking

"Trello

4.3 preview migration. There weren’t too many. First I fixed errors caused by 4.2.1 -> 4.3 preview migration. There weren’t too many.

Trello Task - Then the Inventory Overhaul - it now supports equipping into both hands, and support for defaulting into either as well.

Then the Inventory Overhaul – it now supports equipping into both hands, and support for defaulting into either as well.

Trello Task - Finally I spent the rest of my time unsuccessfully trying to find out why the particle effect for the oil spill does not light up on remote clients. So that's on the plate for today as well.

Finally I spent the rest of my time unsuccessfully trying to find out why the particle effect for the oil spill does not light up on remote clients. So that’s on the plate for today as well.

Porting up to Unreal Engine 4.3 – Setbacks Caused by Boneheadedness

Click image for source! (Credit goes to the artist! Not affiliated with the project - used for blog enhancement purposes)

Facepalm – Whiterun Guard

 

Progress has been swift but not without setbacks, as with the problems I encountered moving my project from UE4 4.2.1 to 4.3 preview.

I decided to port up to it because it offers some particular functionality I required, namely the On Actor Fracture event.

I use this to figure out when the destructible oil barrel has cracked open, to spawn the oil spill (which as described previously (under Other Stuff That’s Done) – can be lit by throwing a torch onto it, or other on-fire item). There are some other improvements I wanted access to, but that was the reason for switching now.

Unfortunately I made a bonehead move and converted a copy of the project, started working immediately on adding new stuff (torch throwing, barrel breaking spawn oil spill etc.) without actually checking to make sure that everything worked properly otherwise.

It did not.

The plan for last night had been to take a short video of how the gameplay with the oil barrels and throwing torches was shaping up, but instead…

I spent last night debugging the things that were wrong I had missed, mostly related to the item pickup/drop functionality over the network. My plan for today is to finish up going through the 4.2.1 source blueprints and make sure everything is intact and correct.

What seems to have happened is that the conversion didn’t actually get all the blueprint nodes and variables, and in some cases changed the options of other nodes (raycast was set up to show debug, despite debug being off in the 4.2.1 project).

Once everything is back to normal in the 4.3 project, I’ll be working on overhauling the inventory system.

Here’s the Trello task for that:

Inventory Overhaul Task on Trello

Inventory Overhaul Task on Trello

Once that’s all finished, it’s on to setting up the rat enemy and then the AI for it.

Rats! And You, In Dungeon Survival

Rat Swarm by Jay Odjick

Rat Swarm by Jay Odjick – (Not affiliated with the game – just for looks! All credit goes to the artist!)

Rats are usually boring enemies in fantasy and medieval games, used to introduce new players to combat, and hardly intended to inspire terror. The exception is usually some sort of giant rat, but that too has limited scare factor when the players are used to fighting giant-everything (spiders, wasps, bats, etc.) any of which is more creepy than a giant rat.

In Dungeon Survival, I want rats to be the first enemy players encounter, not because they will be pushovers, but because they will have some interesting mechanics that will heighten their fear factor and hopefully, do justice to how creepy a bunch of rats in a dungeon would be.

In this post I’ll be going over two aspects of rats in the game, though the first will be about the player.

The Kick Attack

Your character will feature a few basic unarmed attacks. I’ll be going over the kick attack now.

* Physics based – It will work by having a physics volume follow the animation of the kick on the character.
* When the volume connects, it will impart damage on the hit actor, as well as an impulse. Any object that responds to physics will fly out.
* Enemies that take enough of an impact on this stage will go into ragdoll mode.

Rat Behavior

One thing that almost anyone instinctively fears is disease, and in the case of rats, that means them crawling onto you.

* Rats will be able to crawl up the character.
* Using hand motion controls (or a contextual punch attack – more on that in another post) the player can slap the rats off, but it has to be done with enough (in game) force to actually move them.
* Similar to the kick attack, a strong enough hit will make the rats ragdoll.

In addition to that, rats and other enemies will take impact damage – so a good kick off a ledge can be a one hit kill if done properly.

(Those readers interested in VR will note that the rat climbing behavior outlined above will be particularly creepy in VR. This is by design.)

Might look something like this.

Swarm of Shadow Rats by Christopher Burdett (again - not affiliated with the project, this is just to illustrate what I mean!)

Swarm of Shadow Rats by Christopher Burdett (again – not affiliated with the project, this is just to illustrate what I mean!)

Plans for Early Access, Modding and the Future

In this post I’m going to cover some of the longer term plans for development of the game and also how I’m going to be making it available for players.

First about the demo/early access situation.

In my own game-playing experience, I find that there are quite a few indie games that are either released or in an early access state that are great but don’t offer enough real meat to the experience. To be expected from alpha/early access games, but it is a lamentable situation.

Especially with co-op games, it’s hard to get friends on board to ultimately run out of content and things to do.

One game that I think did a great job handling early access was TaleWorlds’ Mount & Blade (a game I am particularly fond of).

The initial beta release had enough gameplay to keep folks interested and to grow a vibrant community.

However, M&B didn’t really explode past the initial word-of-mouth popularity until that same passionate community figured out how to mod the game by reverse engineering how various aspects of it worked.

A frenzy of activity was spurred by the first modders, and eventually tools to mod the game more heavily were developed by the community. Finally, some months later TaleWorlds released a more feature complete way of modding the game via the module kit.

To this day M&B has a strong modding community and an active player base.

Moving off of the segue…. What does this mean for Dungeon Survival?

As with many indies, the plan for Dungeon Survival is to ultimately launch a Kickstarter to fund the game’s development out through release. Unfortunately though, that doesn’t jive with my desire to get the game into the hands of players as soon as its fun.

Right now development is focused on building out a 3-level dungeon demo which will show off gameplay in a specific way:

* Basic survival gameplay – eating, drinking, using the environment to kill or avoid enemies. This will be on the first level of the dungeon, primarily (and through the 2nd and 3rd, of course, but the 1st level will be focused on those aspects).

* More advanced inventory and environmental interaction, as well as crafting.

* Finally, the third level will focus most heavily on challenges and puzzles that require the player to use the environment to overcome them, as well as a finale boss fight to get to the exit from the third dungeon level to the fourth (which will be the end of the demo).

This demo is what will be shown as part of the Kickstarter campaign, as well as for promotion in general (screenshots, trailer etc.). The game’s art and assets will not be final, and gameplay will not be totally complete. But (hopefully) it will demonstrate what the game is about and be fun.

To that end, my plan is to get:

* Enemies and more environmental gameplay in the game.
* The first dungeon level.
* Some traps.
* More items and gameplay related to items.
* A basic save/load system.

Into the game as rapidly as possible (check out my previous post for info on the current status of the game’s features).

Once those aspects are implemented, I will be getting the first alpha of the demo out to early beta testers for feedback and bug reports.

After a thorough round of testing, the demo will be released for public beta testing. Iteration will continue on that demo, fixing bugs, adding gameplay, and building out the second and third levels of the game.

Once all three levels are in and it’s fun enough to replay for a couple of hours at a time, I’ll be starting up the Kickstarter campaign, and releasing a public demo of all three dungeon levels.

Shorter term I’ll be setting up a page on Indie DB, as well as otherwise promoting the development progress in places that makes sense (Reddit, Unreal forums etc.).

Soon to come in the next few days are video of the current gameplay and some of the first little bit of dungeon level, a sneak-peek of the dungeon level layouts and more.

A Word About Modding

I strongly believe that mods can make or break a game’s success long term, and to that end I plan on supporting both a ton of customization of the game by default, as well as mod support.

Unfortunately, this presents some interesting challenges. Namely, Unreal Engine 4.

As you can imagine, the best way to mod an Unreal Engine 4 game would be to have the engine itself, and the .uassets that make up the game. Unfortunately, there are some legality and practical issues that come into the equation because of this.

For one, as part of the Unreal Engine 4 license agreement, I am unable to ship UE4 editor tools along with my game for modders to use. Nothing unusual about that – after all, they don’t want people using mod tools from a UE4 game to make their own stuff without buying the engine.

Secondly, distributing the game’s assets. There are some issues with this, which I’m not really qualified to speak to. Suffice it to say that there are some restrictions on what can be done.

How do I plan to work around this and support mods for my game?

To start, whereever possible I am going to make the game use plain old data for configuration of items and things like that. So modders will absolutely be able to go in and change values/add new items that utilize the existing gameplay functionality that items will provide.

Most modders should be able to use that to get what they want. It’s when that isn’t enough that things become tricky.

So for those brave modding souls that want to add new interactions and gameplay that are not in the game and supported by the item system already, you’ll need to do essentially 2 things:

* Get an Unreal Engine 4 license – it’s $20, you can get it once and cancel the subscription immediately.

* Download the stuff that makes up Dungeon Survival, or at least, pieces of that stuff.

I don’t think this is too bad, but it’s also not totally ideal. I’d prefer modding tools to be free if possible. Right now I don’t think it’s possible.

However, as mentioned I will support as much modding out of the box as possible, both through in-game options as well as tweaking/adding data through the game files.

The Dungeon Of Death! (and gameplay)

In Dungeon Survival, we must provide a counterpoint at all times to the mundane aspects of survival, maintaining one’s health in an environment of slimy subterranean walls, and avoiding the denizens of such places (or dispatching them with one’s ingenuity).

I am speaking of course of the all encompassing dread reaper: Death!

In other words, the Dungeon Survival project now features death and respawn.

In addition to this, since the last update (which was somewhat out of date) the game has:

Inventory System

This is sort of the basis for much of the game, as most of the objects will be “smart” – with some gameplay associated with how they work or interact with the environment/other objects in an intuitive way. I’ll follow up with a good example of this in a minute.

Items when on the ground are physics objects, much like in the Elder Scrolls series. When picked up, the object is attached to the player’s hand.

Currently, only one item can be carried at a time, not counting the “utility” slot (the right hand – which is at the moment occupied by the torch and isn’t completely hooked into the inventory system). In future, the player will be able to craft pouches which attach to the player and will be able to carry certain amounts of items of their own, depending on size/type.

As with the rest of the game, all of these things are networked for multiplayer – including kicking around physics objects (this may change depending on if it presents problems later) and having it sync to everyone.

When picked up, the item is not destroyed – it is taken into the character’s inventory, and attached directly to the hand (or will be “stored” in pouches if available). This is important because the item system in the game will also be persistent – a half-eaten apple will stay half-eaten even when dropped (and as that example implies, the player does not eat food all-at-once). Items will have persistent state.

The above behavior is for the default item type. All specialized item types derive from this type of item and include its behavior (though in special cases they may override it).

As of yet there is only one specialized type – the food item. Which brings us to…

Hunger and Thirst

First, some rationality for even including what some might consider a micro-management gameplay feature.

I’ll always remember my first few forays into the realm of Nethack, that character-based dungeon crawler with timeless charm and a rich set of gameplay.

In particular was when I first made it to level 3 (this was probably not Nethack itself but a derivative, so forgive inconsistencies, those Nethack aficionados in the audience). I had no food. I was dying of hunger, and a dwarf attacked me.

I dispatched the little fellow with little health left to spare, crawled around a corner and took the only option that remained to me. I ate the dwarf.

I ate his corpse and promptly died from dwarf-poisoning.

For those that don’t know – Nethack and its like feature “permadeath”, meaning you must start over if you die. Instead of being (justifiably, since the 3rd level of the dungeon was the farthest I’d ever progressed) irritated, I was cracking up with laughter.

I loved the fact that I was able to improvise in that way and eat the body of a dwarf I’d slain. And even more that it distinguished poison from normal food.

That’s why I wanted to make the Dungeon Survival project in the first place – to capture the magic of the “emergent gameplay” that roguelikes provide, but with a focus on natural interaction with the environment, and on survival gameplay (with, of course, VR heavily supported).

What’s done:

* Hunger ticks town every 5 seconds (numbers here are subject to change with testing).
* When hunger runs out, the starvation meter kicks in. It ticks down ever 5s as well, but at a different rate (you have more starvation meter than hunger meter, but it depletes in larger chunks).
* When your starvation meter runs out, you start to take damage to your health.
* As mentioned before, food items exist and can replenish your food meter.

Thirst and dehyration work in a similar way, but are not hooked up at the moment to aid in testing (and because I haven’t hooked up any drink items, though that doesn’t take much time).

To come:

* Cooking, and uncooked food causing sickness.
* Starvation and eating too quickly after having starved for a while will also cause sickness.
* Poisoned/contaminated food.
* Dehydration and drinking too much water when dehydrated causing sickness.

Other Stuff That Works Now

In addition to all that, I’ve added:

* A proper blend for the torch hold animation, so that you can right click to sheathe/unsheathe the torch. The character’s arm will smoothly blend up and down.

* An oil slick blueprint, which includes an oil decal, trigger volume and fire effects.
* Code so that if the player walks over an oil slick with his torch out, it will light on fire (and does damage).
* A destructible barrel – damage accumulates over time, so that if thrown/hit against stuff enough it will shatter.
* An oil barrel version that spawns an oil slick when it breaks.
* A torch physics item using the inventory system, and the ability to throw the torch via clicking without anything in held in the left hand inventory slot.

This is the sort of “smart object” gameplay I referred to before. Eventually things like the barrel spawning an oil slick, the slick being flammable, and items that have fire lighting the slick up will be generalized so that items will simply be able to specify what types of smart gameplay they use (by both deriving from special item types and settings in those types).

The basis for this system is already in place, and is how the food items work – but currently the torch and barrel do not use the system (that will change).

To come in the short term:

* Thrown torches will light oil slicks on fire.
* Throwing your torch will remove it from your hand,
* Being able to pick up the torch to re-equip it to the utility/right hand slot.
* A two-hand pickup system for picking up things like the barrel (luckily though I’m no animator, I’ve figured out how to build an animation for that and make it work myself).
* Being able to throw two-hand pickup items.
* Kicking/punching physics objects, like the barrel.

After that, I’ll be adding the first enemies to the game (rats!) and building out the first level of the demo dungeon.

Soon I’ll be taking some screenshots and video of the oil barrel gameplay.