Elium – Dungeon Escape

A couple of weeks ago I was working on some of the replication functions needed for multiplayer in Elium - Aiove Defense. Turns out replicating all of the functions I’ve programmed for SinglePlayer started to prove complicated and tiresome. Therefore I’ve decided to cut down Elium into yet another sub-game, one without multiplayer. But the Aiove Defense concept wouldn’t really be the same without multiplayer so the new game will be somewhat different. And so Elium - Dungeon Escape has been born!

Elium – Dungeon Escape is a game with a single objective: the player starts in a prison dungeon and needs to find his way out, avoiding or eliminating guards and picking up items and equipment to make such a task easier. It will also include the following additional features:

  • A medieval setting with 1stPerson/3rdPerson melee and ranged action combat.
  • Random dungeon generation: a new level layout every time the game is played.
  • Online highscores: an in-game uploading tool to compare the results of your game with other players, including goals such as time completed, enemies killed or health lost.

A number of the needed features are already present due to the previous development of Elium in general, but a few extra programming tasks (that were not entirely needed before, but are good to have) will also be required:

  • Simplified AI: an AI system that does not extend from the complex and convoluted UTBot, increasing the game’s performance and giving me full control over all of the AI’s programming which should result in an increase of my own possibilities to create better AI. (In progress)
  • Dynamic pathing: A system to allow AI characters to navigate through the dungeon without having to re-build paths or the navmesh, since it can’t be done at runtime. (In progress)
  • Random dungeon generation: An algorithm implementation to spawn modular pieces of dungeon to assemble the full level. (Not started)
  • A new and better HUD, item models, the actual dungeon art, improved character animations, and polish in general.

All in all the list isn’t too vast, and seeing how I already have two of the new features in progress and somewhat working this game has become more doable. Perhaps this year will see its release?

Snippet: Playing an AnimTree animation from the start

Back when I was starting with AnimTrees and scripting I encountered a problem when trying to play a non-looping animation from within the AnimTree: once an anim sequence node becomes relevant it will start playing the animation at the time it was if it was played before, which means the animation will only play from the start the first time.
View full article »

Looting bodies

I’ve been quite busy lately and this project has suffered from it, but at least I’ve found enough time to implement a new feature: looting dead bodies.

This feature is pretty much an extension of my inventory system+menu except that instead of equipping and unequipping items, it allows to transfer items back and forth between the player character and a dead body that has been interacted with. If such item is equipped it unequips it automatically when you loot it (which leads to leaving the dead characters naked, Oblivion-style).

Anyway, pics or it didn’t happen.

 

New armor

Just dropping by to show the new armor I made for NPC’s for Aiove Defense.

Here I caught a Defender finishing off an Attacker, who ended up one head shorter.

esshot01

 

 

 

 

 

Also the [Voting Page] for the UPC Videogame Competition I entered is up. There are lots of games with plenty of talent in there so if you have a minute check them out. If you like mine please vote for me, it’s under the name ‘Elium – Aiove Defense’

Gameplay video

For the past few weeks I’ve been working in wrapping things a little, as I needed to create a video for a local student/indy game development competition.
Besides all of the action which shows swordfighting and shooting with a bow, you can see some small new level stuff like a small mountain stream with a bridge and some more rocks and vegetation.
It’s still very much a work-in-progress, but besides the excess of movements from the bots (which cause fights to look messy) and a few things that don’t work the way they should, I’m happy with it so far :)

(Fake) Indirect Illumination

Over the past couple of weeks I’ve been working on a new graphical feature: some sort of fake, mostly physically incorrect, but (hopefully) ambience-enhancing, indirect illumination.
For this I’m mixing in 2 approaches at indirect illumination. The first one is the well known Color Bleeding, a SSAO of sorts acts at at neighboring pixels with semi-facing normals, but spreads colors at those areas instead of just darkening them.
This Color Bleeding approach was the most challenging one because UDK does not offer a Normal Scene Buffer, so I had to reconstruct it from the Depth Buffer.
The second approach was an idea of my own, which involves creating a special camera that saves the scene to a RenderTarget, except it does it from a top-down view and with enough clipping to not capture anything above the player. Then a PointLight is created below the player, and it projects that captured scene upwards mapped to match the scene. Graphically the result is that any colors below the player will be projected back upwards, giving the effect that the light is rebounding with the colors from the objects in the ground.
Then the same thing happens but upside down so that I also project down anything above the player, this time without clipping so that even the sky will be projected back downwards.

But talk without pics is usually a waste of time so here is one. Left is with my cheap fake Indirect Illumination enabled (notice the big blue ball’s colors are projected upwards to the player).

Indirect Illumination Test

 

 

 

 

 

 

 

 

 

Of course the effect here is quite visible because there’s a big blue ball below the player, but in a regular outdoor environment (with all terrain, rocks and trees) the effect is quite subtle. I figure the effect will show its best in indoor and/or night scenes where there is much more contrast between lit and unlit parts.

And as with anything at first, it needs optimizing. Specially the Color Bleeding part which cuts down performance by ~20%.

 

Edit: Ok I’m adding a better comparison picture:

 

 

 

 

 

 

 

 

 

 

 

HitMask Blood

I finally got around to use the HitMask feature on UDK uniquely on each of the character’s body parts (by making every body part a unique Actor attached to the Pawn), which has allowed me to make the game “paint” a mask where fighting hits are detected, so it serves as a mask to display blood at the precise place a character was hit.

To fully show the effect I used a Bow to shoot an enemy. Here’s how the poor guy ended up:

ehitmasks

Too much baggage!

For a while now I’ve been working on the game’s inventory. Having persistent characters made this an important feature to have and now was a good time to implement it.

The menu isn’t polished: it needs some icon indicators to make up what each item stat is, and the word ‘Inventory’ at the top and the box it’s in might just go away to make more room. In theory there should also be tabs to separate the different item types, but Aiove Defense will only be about collecting/replacing weapons and armor so that won’t be needed. The inventory menu should also be to the most left position but my game is in WideScreen and my Scaleform scene isn’t, and I haven’t implemented a fix for that yet,
I’ll also want a special camera that focuses on the character and allows the user to rotate it (rotate the camera itself, not the character. putting a 3D Character on top of a Scaleform Menu is a pain I don’t need to go through), which is kinda there now but I need it to be offset so that the character rests on the space to the right.

Still, it works. Pressing the “I” key opens/closes this screen which refreshes the list with items currently in the inventory, displays its name and stats (weight / quality which is weapon damage, armor rating, etc / durability / money value – though there won’t be shops in Aiove Defense, it’s just there as information).
Clicking items will equip/unequip items, if you try to equip an item that can go into different slots (ie. a Sword can go into the right or left hand, in the main or the alternate weapons set), a small popup menu will appear asking where you want to equip it.
Depending on the item type, a generic icon is displayed to the left. It’s generic because I won’t be spending time in creating unique icons for each item, there’s already enough work in making the 3D models which are visible in the character anyway, and the icon is so small it wouldn’t make much difference.
Below it all, the total weight is calculated. In the future it will tell the total weight of the equipment and the maximum allowed weight. Exceeding the maximum weight will cause severe penalties like barely being able to move. However even below the maximum allowed weight there will be smaller penalties like slightly reduced movement speed, etc. A mule player will certainly be slower than one carrying just his equipment.

Anyway here it is.

 

 

 

 

 

 

View full article »

Tutorial: How to re-bind keys in-game

I’m working on a menu that will allow the player to re-bind the game actions to different keys. Before the menu comes though, there’s some stuff needed to make it work: being able to re-bind a game action to a different key.

As you probably know the keybinds are found in UDKGame/Config/UDKInput.ini. If you press a key it goes and tries to find the apropriate function in the PlayerController class, and then on his owned Pawn class. However you might not know that before looking in the PlayerController class, it looks in the Input class. To keep things clean then, we’ll implement this functionality in the Input class.

View full article »

Character Progression: Strength

While lately I’ve been mostly working on character blood and gore, I took a small pause for the last few days to add a new feature regarding character progression. Now the character’s strength is represented graphically in its model, but instead of trying to describe it I’ll let the image do the talking. Remember these are just the two extremes between an interpolation, so any intermediate values exist from a smooth transition.

 

 

 

 

 

 

 

 

The implementation’s theory is quite easy here. According to the Pawn’s Strength variable I change a material parameter’s value that LinearInterpolates between 2 NormalMaps: a ‘Strong’ and a ‘Weak’ one.
The same Strength variable also blends in a MassBoneScaling SkelControl that I created inside the character’s AnimTree. It’s a shame that the bone scales can’t be controlled non-uniformly with different values along X, Y and Z, but at least the results using a uniform scale were good enough to make the character look more chunky without looking weird.