Town, Camping and Interiors

Bit of a long time since my last update. Sorry. You know how it is etc. You can follow me on twitter @skyemaidstone if you like. I do tend to update that more often.

Anyway, I’ve been beaving away at making the 2nd town “Serah”.  It has a forge, market, guard towers, a wooden wall to protect the towns folk from the dangerous lands beyond and a large comfortable inn (compared to the tiny one in Tarin. Here’s a couple of screenshots of how that’s getting on:

serah2

serah1

You can also see it has some nice magical lights to act as street lighting. Who knows how they work? It’s magic. This required me to make a light editor so I can adjust their color, intensity and obviously position.

Next up I moved on to an enemy camp:

goblincamp

This will soon be populated with orcs or goblins or some kind of enemy. This will be the main problem for Serah so I’m planning a few quests for this.

And that brings me to the next focus of my work: Interiors.

When the player enters a building or a dungeon they effective change to a new mini “world”. So I needed to make it so my editor saved models, lighting and “terrain” (which is usually just flat for a 1 story building). This proved fairly complicated but I got there with some nice fairly elegant results in the end.

Here’s a little video of Tarins’s small Inn.

 

Needs candles, fire in the fireplace and some patreons to drink and offer the adventurer some words of advice or perhaps send him on a quest and of course an innkeep to serve drinks and offer a room for the night.

Next up I’m going to have to make the particle effects editable so I can place them where they’re meant to be in the world (fire in the forge/fireplace, butterflies around a bush, water from a fountain – stuff like that) because my flaming braziers are rather hard coded right now. Also I really would be nice if the place had something else to fight besides the 8-12 rats behind Darin’s farm.

Until next time…

 

 

The Realm is Growing

Oops. Well it’s been a little while since I posted an update but sometimes that’s a good sign.

I’ve been so busy making it I forgot to document what I’ve done. Anyway, excuses aside as you can see from the featured image the world has grown a fair bit. You can barely see little Tarin behind the rocks and trees that have sprung up around it.

I had to make some changes to my editor to make it more useable on a grand scale. Making the camera that can sweep and swing around the terrain, cinema style was one of those (which I took that screenshot with). That made it easier to “spray paint” where i wanted things generally then switch back to first-person to place them carefully. That only really applies to things like instanced models and the texture type used on the terrain.

Talking of terrain I could resist adding bump mappnig to the terrain. Amazingly this wasn’t too tough. My engine already supports normal and specular maps but those are used by the geometry generate by package like 3DS. The challenge I had was to generate the tangent/binormal data for my computer generated meshes. That wasn’t THAT bad and with a little help from the great guys at http://www.gamedev.com it was up and running pretty quickly.

Here’s a before:

bumpmapterrainbefore

And after:

bumpmapterrainafter

You might need to zoom in a bit to see how it’s working but its basically adding a more bump look to the road texture (and fading out to not use this technique for other textures since I don’t want bumpy grass for now. Would be nice to use displacement maps but that’s a nice-to-have really. I shouldn’t really be adding subtle (but nice) visual effects at this stage anyway really.

Anyway now the world has a fairly long road that runs from the starting village of Tarin all the was to the larger village/town of Serah. The new villge will have 2 storey buildings and some slightly more modern ones. Perhaps some better shops than just the odd stall.

For now it’s just a flat plaza… I’m going to dot around some bushes, trees, flowers and rocks all the way either side of the road first.

Besides that, and those of you who follow me on twitter @skyemaidstone will know this already, I’ve been working on player skills and a trainer to buy the knowlege from with knowledge points:

trainer

playerknowledge

The first screenshot shows the trainer (The Sage in Tarin in this case who has some basic skills to teach you) and the 2nd shows you the abilities you learn from each of the skills. My player knows all the skills for now. How it works is in order to effectively use a short sword (for example) you’d need the Light Swords skill. So when you equipped a short sword a few abilities will show up. However if you learn Light Swords Expert then equipping a short sword will give you more abilities and perhaps even some combos. Skill points are just earned from questing for now but that won’t be the only method. We don’t want to force our player to do every quest in the game although some will be required obviously. This isn’t going to be a first-person shooter after all.

Ok hopefully next time I”ll put together a video of the trip from Tarin to Serah.

Until next time…

 

So Many Updates

Well where to begin. Realms has had so many updates it really starting to “hang together” as an actual game at last.

I’ll just list a few of things rather than blather on for ages about each one.

  • Monsters now have a chance of dropping a chest which in turn has a chance of dropped varying quality and number of items.
  • Monsters can have “body” loot too. So if it isn’t in a chest it’s actually on their body instead.
  • Indicators have been added for corpses that contain loot. The corpse will decay a lot slower if it has an item on it and it will never decay if it has a quest item. Quest items corpse have spinning Q and other items would just have a spinning star.
  • Monsters can now have multiple attack animations (again I’ll need to find a good animator at some point because my skills are mediocre at best).
  • Particles can now fly in the direction of something. This is first used by the Ghost of Venril monster that haunts the graveyard. It spews forth green plasma/lightning.
  • Killing a monster now gives you some experience points. This meant I needed to have text notifications that float and fade to show how much you gained.

I spent rather a large amount of time finding an annoying lighting bug with the animated models. They just weren’t being effected by the color of the lighting enough for some reason.  After a few hours of head scratching i realised 2 lines of code were in the wrong order between the static model shader and the animated one. Annoying but it looks suitably beautiful now.

Another large change is pretty much the whole UI. The “hotbars” have now been replaced with a more console friendly layout. I think it looks a whole lot neater too.

xp.png

The first 4 are for the primary weapon, the next are for the secondary, the third for the ranged weapon slot (or a wand etc) and the 3×3 block are for assigned spells or items.

The health and power bars are much smaller/clearer/neater too and I think a lot nicer.

I’ve started to add in the skill/weapon merchants which will use the same UI to try and give consistancy but that’s not ready for human consumption.

We almost have an actual game!

Until next time…..

 

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!

Roaming and Targetting

Ok loads of updates. Some of which took absolutely ages to get look reasonable.

First up I continued where I left off (which is rare for me since I tend to hop around rather a lot). So before I had it to a quest npc (a male peasant farmer) would offer you a quest to help him with a rodent problem. You can accept this quest and will be offered an item to help you complete the quest. A dagger in this case.

The quest object is added to the player object and appears in your journal a a quest name. Nothing too complicated there but it works pretty elegantly at least and lends itself to easily making so I can save the game state (ie the Player wants to quit and play something else – heaven forbid).

Ok so now I needed some rodents for said rodent problem. I already had my rats kinda walking in a straight line and following the terrain if i told them to however that’s all they did. Unless you attacked them in which case they will follow you to the ends of the earch (around 25km away in this case) and try and kill you. Since they hit for hardly anything that would take probably hours for a rat to kill you. These are, after all, the started quest monsters.

Anyway so I had to make the roam but not too far away from the farmers farm or else what kind of problem would he have exactly? “Oh these rats that are 10km away are bothering my crops?”. I’m not even sure rats eat corn.. but anyway. So the rats first had to roam within an invisible bounding box. That was simple enough,  I just had to add some code to the editor to allow you to set the min/max for the box and save it for each rat.

Now onto the roaming itself. There a simplistic AI for this. The rats have 8 different actions they can perform. One of these is randomly picked after a random time (only a second ish) and they will various in turning rate, speed, animation speed. Also they will avoid each other and try not to make it too obviously they’re in an invisible box.

Here’s a video showing how that looks. I’ll tweak it some more but i’m fairly happy with it:

So there you have it. Next up i’ll be making it so you can kill the rats (which already kinda is done) and make them respawn after a while. They will leave a corpse for a few minutes first and possibly even drop some treasure. Oo Treasure!

On a side note I’m really starting to see why there’s such a long list of people in the credit at the end os PS4 game. Wow there’s a lot of work. I’m glad I didn’t go with my original idea of making an MMORPG. I mean this isn’t going to be Witcher 3, let’s be realistic it’s also not going to cost £50-60. Also remember, No Man’s Sky was only 2-3 guys at first (6 in the end) and that was a pretty huge success. I loved it anyway.

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…

 

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.

The Village of Tarin

Ok so after another game design meeting we came up with a name (Tarin) and a basic layout for the starting village. 3 or 4 homes, a tavern for weary travellers and a farm (producing some kind of corn/wheat.. or something).

I’ve added a few props around such as barrels, a water trough, some creates and boxes. It’s funny how adding a few small things really makes it start to look like a village.

I’ll be adding in some more of this stuff along with scattering some instanced pebbles and soft-billboarded whispy grass to really add some realism to it next time.

Next up are some people to speak to. So I’ll need to wheel out Mr and Mrs Peasant (and get them doing a couple of basic animations. Oh how I hate animation.. Maybe I can hire someone for that part because my own efforts will certainly not be professional enough.

Until next time weary travellers.

tarin1.png

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!

Roads of the Realm

Sorry no update last week but I’ve been hard at work (at work too unfortunately).

The realm now has double blend maps so I can have grassy road or roady grass (whatever that means) or snow or whatever else really..

If you’re interested I’ll show you how it’s done. There’s basically a map of where the grass/rock/other should be that’s red for say grass, blue for rock and, green for mud. These can be blended together too. The more red the more grass, the more green the more mud etc.

Oh.. here.. a picture (or two) tell’s a thousand words..

blend1

So that’s blend map 1. Currently used for grass, rock, mud. And blend map 2..

blend2

Which is currently used for cobbled road and snow and something undecided. maybe another type of rock or gravel. We’ll see.

The end result in the screenshot at the top of this post.

I’ve also been deep in the bowels of the game code making the NPCs (non-player characters) which are, in this case, giant rats have attributes so they can be involved in combat of some kind.

I made a crude but effective editor for this too.

npcstats

See? I’ve been hard at work since my last post.

I need to get my rats to follow the slope of the terrain properly since that doesn’t work and I still haven’t fixed the jiggly shadow bug for medium quality shadows. The NPCs need to generate shadows too.

Really trying to keep focused on getting an actual game that people can really play rather than small details like that though.

I’m thinking of switching out the log walled town walls for something in stone since i’m not sure they fit well with the more modern buildings. Some historian could probably tell me. The town needs a name.

Comments and suggestions welcome!

Till next time..