Misty Ruins and Ghosts

Hello!

Ok much progress was made which is always rather nice.

I had to make some editor tweaks to make things easier on myself but I won’t bore you with those.

I couldn’t resist adding a post-processing effect. You’ll notice in the video below everything has a slight blur where the bright/dark areas have a large change. This effect is called bloom and it simulates how our eyes handle bright light. There’s a slight bleeding of the bright color into the dark. It’s a fairly cheap effect to do (in terms of processing). I was a bit of a brain ache to get it to work with both the deferred rendering and the forward rendering parts of the game but hey.. I think it adds something.

So anyway enough technical stuff. After being inspired by some ruins I was wandering around in real life. I found some nice ruin models on one of the various model sites and took probably far too long importing and tweaking them. Along with a bunch of tombstones, gravestones and broken rubble. On of this I made an old ruined road (with the help of my new color map editor) an added in the essential ground mist/fog that’s always in graveyards (although I’ve only ever actually seen that on TV if i’m honest).

Here’s a little video of the ruins so far. The player is using the ghostly shader for now while I get it just right:

 

So yeah I found a nice bunch of ghostly models to use but then I realised I have no way of drawing an animated transparent model… So yeah I had to add that which took a little longer than I’d hoped. Kinda looks fairly ghostly at least.

Once I’m happier with that i’ll add in my ghost model and give him a particle effect of trailing faint mist.. maybe green mist or something, We’ll see what looks good.

My player needs some skills so I’ve finally got around to designing a nice Skills UI with my “project manager” (the person who keeps me from fiddling with shadows for 6 months). So I’ll be adding that. But I need someone to teach you these skill.

So for that i’ll need a old man (a sage). Every good RPG needs a wise old man. I’m in the process of importing a sage and giving him a  ruined shack to live in.. That will be at the end of the faint path from my previous post. That means the character screen with need skill tabs and I’ll need to make a UI for the sage for you learn the skills as well…

So much to do, so little time..

Until next time!

Quest and Tasks

Ok lots more work behind the scenes with a bit more for you to actually see this time. So… NPC/Quest Characters can now have quests/tasks attached to them.

Quests contain some text for the name, what the quest giver will say to you to entice you to do the quest, an initial reward (for example something you’ll need to actually complete the quest) and any number of final rewards. Also, of course, it contains what you actually need to do.

When you select an NPC who has a quest for you he will talk to you about it and a summary of what you’ll need to do and what your reward will be with pop up too.

You can accept or decline this and then, if accepted, then “Quest Accepted” will dramatically appear and the quest object is attached to your player object.

quest2.png

Before this of course I needed to actually make a version of my villager that wasn’t a merchant (I only had a merchant). He stands by his farm and fidget a bit (weird how hard it is to make a fidget animation not look ridiculous). He’s also set as a different type of NPC so now I have enemies, merchants and quest/task npcs. And as I mentioned above npcs can have quests attached to them.

I also had to find a nice shiny font which I semi copied from Final Fantasy 14 (not literally – just based on before i get sued). There’s is far nicer than mine but I’m happy enough with the result.

Next up I need to make the initial quest reward appear (I’ve made a dialog for this already) and then when you accept it, it will appear in you bag and you should be able to use it (a dagger in this case).. So yeah a lot to do before you can complete a whole quest cycle (get – do- get reward) but that’s what I’m aiming for.

I keep seeing mist rising from trees in films and TV shows. I’d really like to add that effect to my game but I have to resist adding effect after I found myself spending 2 months getting ground fog looking just right.

Anyway, until next time…

 

Realm of Buttons

Well it’s not all swords and sorcery, sometimes you have to focus for a little while on the little things. In this case buttons and icons.

The game now has items which can have all manner of different attributes attached to them. Things like their quality, value, weights and they can also have any number of required skills attached to them (ie so your could  carry a crossbow in your bag but you couldn’t actually used it with no knowledge of say bows and maybe specifically heavy crossbows – or maybe with some penalty without all the required skills).

Items all needed an icon to represent them so I added in a few items for starters: A basic healing potions, a dagger, a mysterious scroll, a leather belt, a chain mails hat and leggings and a couple of others.

The Character Screen’s Inventory tab now allows you to click and move items around to arrange them in your bag and have your character use them by dragging and dropping them over the relevant equipment slot. Like so:

buttons2

That all works rather well and is hopefully pretty standard stuff for role playing game fans. I’ve done it in a kind of Dungeon Master style but in more of a Final Fantasy 14 layout (without the confusing armory chest idea that I wasn’t a fan of).

Another screen I needed was for when you open a chest or a merchant or villager gives you an item. This is the “Reward Screen” which is the featured image at the top.

And finally I needed yet more buttons for you to be able to answer questions from the villagers and merchants about transactions or accepting some task they offer you (also I had to make it so you could only actually talk to a villager from a reasonable distance away). So the buttons for this are like the screenshot below:

buttons1

So what’s next?

Well, I need to tie all this together now so I have story line for the game planned out but I don’t really want to start making that yet until all the pieces work together. So next up is to make it so an NPC (villager) can offer you an item (A dagger), which you can then equip in your weapon slot. He will also offer you a question to help with the rat problem they have West of the village (a classic kill 10 rats quest). After you kill a few rats (lets make it 3 just to be different) then you can return to the villager and he will give you a reward (a healing potion). If all that hangs together then I have rewards working, inventory working, quests working, combat working and well.. lots of stuff working.

Exciting stuff.

Until next time…

Animation and Tiny Details

It’s amazing how much time you can spend on the really small things. For example my flaming brazers took up way too much more time. My fault.. I spotted them in Final Fantasy 14 and though “Damn they’re way better than mine”. So I found a better flame texture, added a surrounding glow and that improved things no end. I wanted them to start off slightly blueish and fade to the orangey color as they fade away completely….

This then led to me finding a bug where my colors weren’t even being used at all (was just defaulting from fading from white to white). That was a pain to track down but the result is much nicer flames which look realy realistic now. I’ll put them in a video another time.

The other, somewhat daunting task, is to make the NPC class support animated models. As you can see from the screenshot above, I succeeded in that. But again, this meant a fair bit of work behind the scenes cleaning up the animated model class to use the same shared texture resources as static models and also make the npc class supported by the editor with extra data (like animations and how fast to play them). A headache to say the least.

Feel like I didn’t make THAT much progress when I don’t have a pretty new video to show but I had to make the support for things for the player to interact with a lot more sophisticated or else it would just be a world of roaming non-animated rats. Not a world I’d want to live in anyway..

Until next time.

Flaming Braziers, Trees and More

So loads of updates and it’s really starting to come together as a small village.

As you can see the tree are back from the first tests and as you can see from my YouTube Channel there is now fluffy grass to go in the patchy grass around around the village. I think the effect works really well and it a combination of soft particles and billboarding for those that enjoy the technical side of all this. I’ll be adding bushes, rocks, patches of pebbles and scree (I think thats a word) which will make use of the Instanced renderer shortly.

What was great fun to add was some flaming braziers. That’s the right word for those isn’t it? Looks too much like Bra to me? Same spelling? Anyway.. those flaming pots as lights to welcome you to the village. I have quite got the light sphere to match up perfectly with the particle effect; it’s a little too intense and white but it’s nice to finally get to use the deferred lighting I built all those months ago.

I started to add in the peasants but that’s not really ready for public consumption yet.

I think the village need a vendor of some kinda. Some guy/gal selling stuff from under a canopy or from a tent.

Until next time.

Probably Should Have Made Snowflake Particles

Oh well I didn’t. I was more interested in making  a sparkly effect for my players’ combat abilities (i’ve got blue sparkles like the JPRG Atelier Feris for now – Little cartoony but it’ll do for now) and blood splatters when you get hit by a monster (yes probably a rat for now).

 

These effects now need a way of being triggered at the appropriate time but I ran out of time for now to make that bit happen. The effects die after a certain number of particles have done their thing so far and can be positioned anywhere.

Depth sorting on the particles works quite well with no noticeable detriment to the framerate.

I’ll need to fire off multiple copies of the same effect again so I made need to restructure this a bit some more but It’s working well as it for now.

Will I have time for another update before Christmas? I hope so..

I really want my rat causing bloodsplats and me hitting back with my blue glitter.. Hardcore stuff!

 

Kill 10 Rats

It’s really picking up speed towards being a vaguely playable game now. I’ll just make a quick list of what’s been added:

  • NPC/Enemies now have shadows.
  • Shiny fonts
  • Loot dialog box
  • Quest dialog box
  • Enemies hit back
  • Enemies can die
  • Enemies can drop a treasure chest

Most of this is rather crude and I’m not 100% happy with any of it really (except the shadows).

The font is annoyingly spaced out and the look doesn’t quite fit but it’s better than TTF Arial. I don’t really like my dialog boxes either but they’ll do for now.

The enemies die ridiculously (just flip on the their side).

The treasure chest is just the same model moved just in front of the player.

There’s no way of actually putting the loot from chest into your bag.

But DESPITE all that I’m really really happy with how it’s going. I mean you can actually walk somewhere near an enemy, target it and go into basic combat with it and kill it (and maybe get some loot). That’s huge. It’s basically the flow of the game finally working.

Some refactoring and general neatening up is needed and also I get to do a really fun bit – add a particle effect for when you get hit or when you hit an ememy. Looking forward to that.

Hopefully I’ll get another update in before Christmas..

Oh I made a new video of the combat and loot etc. Even in it’s crude state I’m pretty happy with the result.

 

Back in the Rat Race

I’m not obsessed with rats, honestly.

Ok right well after completely taking everything apart to finally get to the bottom of my shadow jiggling problem I decided that the best solution was to make my player the centre of the known universe. This was simple enough and didn’t require me rewriting my shaders or making TOO many changes. I won’t bore you with more waffle about shadows but in a nutshell the problem was that shadows worked perfect the closer to position 0,0,0 I was in the world. So therefore position 0,0,0 is now where ever the player is standing (and everything is drawn from that perspective. Sorted.

Moving on and back to the game finally..

Ok so now you can actually assign an ability to a hotbar position. There’s only 6 abilities for now, melee attacks (short and ranged), Magic attacks (short and long range), a self heal and a monster defencSe reducer. These all worked great straight away since I designed a nice ability object to which should cover quite a few different abilities, combat and otherwise,

I made a little video which demonstrates the new stable shadows (there’s a small wipe effect between the cascades but I really don’t care about that for now, there are many ways to hide that). It also demonstrates the basic combat with me against a huge and medium sized rat. They still don’t hit back so it’s a bit one sided.

So, next up:

  • Make the rats turn to face me more realistically
  • Make the rats follow me
  • Rats need shadows! (all well all monsters do)
  • Monsters need to hit back
  • Combat effects (started that but there’s nothing nice to see yet)
  • Monsters need to die – they just do.

Going Off on a Tangent

Oh dear I appear to have gone off on tangent.

This had to be done at some point but I’ve been fiddling with shadows again. You see, there’s this annoying little jiggly effect that happens on the shadow edges of objects with sharp edges (like the building above).

There I was adding in the hotbar abilties to make a ranged magic attack and melee attack (being able to set the damage, check the range etc, add in a self heal/cure) when I decided to fix the annoying shadow problem.

There are huge volumes on real time shadow rendering and I can see why. After some more reading I tried various technique for getting rid or reducing the “shimmer/jiggle”. Most people seem to call it shimmering, mine looks more like a jiggle which I think should have been a clue.

Anyway I used a technique called Texel Snapping which I seemed to have used correctly and it made pretty much no difference. I contacted a couple of people on GameDev and various game development blog and no one could see anything wrong with my code. The ighty MJP from GameDev suggested the problem lies elsewhere (elsewhere to how I’m generating the shadow maps) and it seems he was right.

I found an old test problem I originally wrote to test my models in a little world with lighting and shadows and slung in my new “anti jiggle/shimmer” code. Boom! Perfect shadows. Even if I i deliberately stretch them out so they’re poor quality they still don’t jiggle or shimmer.

Well so where does that leave me. Amazing shadows in my game? No. Amazing shadows in my test harness and I’ve learned loads of techniques for making them soft etc using DX11. None of which fixes my Jiggle.

So now I have 2 versions of my lighting/shadow engine (both in Monogame – I had to convert the old test harness from XNA first). 1 jiggles, 1 doesn’t.

I need to find the difference. It’s there somewhere. My engine is kind of huge unfortunately.

Hopefully I’ll be back to actually writing the game again soon.

Another 2-3 weeks on shadows. Argh!

Man vs Rat

Ok sorry for the lack of updates, I’ve been on holiday/vacation. Didn’t stop me reading about shadows though. It’s such an annoyingly massive topic and although my shadows are just about acceptable there’s still an annoying amount of jiggle.

Alex who wrote Cascaded Shadow Maps With Soft Shadows has been helping me with this a quite a bit and has kindly donated some of his time to help me solve the jiggle. Unfortunately it’s not entirely gone but it’s much improved and I’ve learned a lot anyway so that’s always useful. I will have to come back to it or else I’ll end up with beautiful shadows in a few weeks/months/years and no game.

Anyway, enough about shadows! What have I been working on? Well… quite a bit. I have come to the point where I had to decide what I was doing about the stats of the players and enemies. What determines how hard they hit, how much they can avoid, how much power they have etc. Well for now I’ve gone with the classic D&D style stats of:

  • Strength: How hard you hit and how much you can carry
  • Dexterity: How hard ranged attacks hit and how far they can travel.
  • Intelligence: How hard your spells hit.
  • Wisdom: How much power you have and how much health you can heal.
  • Stamina: How much health you have.
  • Charisma: Affects prices from merchants and how much you can resist certain enemy spells(?).

Along with that I set some other basic stats like maximum health, current health, power and gold.

Both the player and all NPCs have these along with some other minor details like if they’re dead or not.

But that’s not all! (overly dramatic) NPC’s now roam around over the hills. I had to do some rather annoying math to get them to nicely follow the terrain. I don’t just mean their position above the terrain the have to tilt and roll to the angle of the terrain or they look ridiculous. That wasn’t THAT bad though and the effect is great. Very useful too. I need to add a button to my editor to make an object (a rock or a building etc) snap to rotate to the orientation of the terrain. I do that manually now so that would be great.

Also the hotbar how lots of shiny new icons (not made by me but bought and tweaked by mean). Nice aren’t they? Anyway not only can you now hit a targeted rat, it will turn to face you (rather abruptly for now) and it’s health will go down. And there’s even more! (Ok this is getting a little silly sounding now but I really have added a lot). The game now calculated the range from the player to the targeted enemy to make sure you’re close enough for the selected attack.

I’m aiming to have the whole combat cycle. Kill or be killed by next time so.. until then.