Smoothing and Screen Sizes

Wow that has to be the dullest title of one of my blog posts yet.

I’ve actually had to do quite a bit of really quite dull stuff on the game over the last month or so. It all started one hot late summer day when I decided to add in the gathering nodes since the first dungeon was kinda finished.

I’ve added yet another editor that allows me to place little sparkling gathering nodes in bushes or grass or on tress or rocks (for gathering plants, wood, rocks/ore).

So here’s how gathering works:

  1. Have the skill (you have 3 basic one’s by default).
  2. Have the appropriate tool. This will allow you to see sparkling points where you can gather items from.
  3. Find a sparkling “node” and then press collect.
  4. The guy will then gather a random amount and rarity of items from the node and it will disappear.

 

 

Like so.

So that works nicely. The nodes reappear after a while but only if you go away for a randomly amount of time and a random distance. I may make them randomly spawn a different spots too but later.

Ok so gathering works nicely now and as you can see from the right screenshot the bottom right now contains notifications of when you collect something and also when you get an increase to your skills. I’m going to reuse that a bit for other things. They slide on nicely, stack up, then fade away.. I kinda of borrowed that idea from another game but maybe I’d better not say this time. I think the effect is nice anyway.

And now onto a bit of a side track which I wasn’t supposed to be going down: FXAA. For those of you who don’t know what that is. It Anti-Aliasing or just basically making the image look a bit smoother by slightly blurring areas where there are jagged lines and it’s easy to see the pixels. That’s a very basic descript but I won’t bore you with the technical details. If you’re interested, it was invented by a guy at NVDIA and is used in many modern games since it doesn’t slow the game down much and produces a nice improvement. What is FXAA?

Ok so that calls for a before and after:

 

 

 

It really make a nice difference where there’s a large contrast between the sky and landscape (although that will be further improved by post-processing distance fog later on as well). But it also makes the edges of leaves of trees, rocks etc all look a little more smooth. It’s the illusion of more pixels basically.

The game now handles various screen resolutions all the way down to 1024 and up to 1920. For some of this it was a simple transformation matrix but for other screens ie pretty much user interface screen there is (merchant, skill trainer, innkeeper, quest npc, quest reward etc etc etc) I had to make it centre itself based on the selected size and even resize itself and use a smaller font in some cases. This was a rather dull and massive undertaking but it was necessary of course and allowed me the opportunity to tidy up the UI code.

All that tidying and screen size stuff has made it so I can now easily design my new and hopefully final user interface screens:

  • Skills – Picture and detailed description of all the skills the player knows
  • Recipes – Everything the player knows how to make along with things they have an idea about but have not completely learned yet (Atelier style).
  • Crafting – A two-step process of selecting the item you want to make from a list (showing what ingredients are required and you success chance along with the final result). The 2nd step is to select ingredients (quality and amounts) and press craft and either end up with the item or not.

 

Ok so that’s what I’m working on next.

I’ve also made a story tree (Like Detroit: Become Human) for my actual story so the player can go down various story paths for different endings. Some actions are good, evil, some just effect where the story is going.

I also did some more world building design to fill in some of the empty areas which I’ll be doing shortly.. the world is just so damn big!

Until next time…

Cutscenes from the Gods (and Goddesses)

Ok so at some point I needed to start putting the actual story together. In order to this I made a StoryLine object and gave it child objects which are CutScenes.

Initially these are pretty basic: A background texture, some dialog box text, the name of the person talking to you and the name of the model used. Later I’ll add support for multiple NPCs and particle effects, cross fades and stuff like that but I just wanted it up and running. You can see a basic example below.

After this I added “Zonelines” this is when the game knows you’ve entered an area and will show you a notification. Like when you enter a town or if you’re always IN a town the it will show a “Zoneline” for a door you can enter, along with an Enter button and an icon to show it’s a doorway.

This can also be used for any time you’re about to change area, like entering a dungeon etc.

I also needed a new monster in game so I’m working on a wolf – I’ll show that at a later date but It looked nice enough but it showed a problem with my self shadowing which took a little time to fix. I won’t go into the boring details but my animated maps weren’t loading their bump maps or using depth bias properly, also the PSM wasn’t working properly on the super-high quality shadows near the camera. If you want more details on any of that then drop me a line on twitter/instagram.

Ok so I put together a little video showing how this all hangs together.

So next up I’ll be finishing off the wolf so I can have them roaming around and adding a quest in the 2nd town to kill a few of them.

It’s really coming together now.

I might have to start working on the crafting and gathering soon.

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…

 

The Slightly Angry Village Woman

Woah.

So much progress made, boringly a lot of it is hidden away a bit from anyone actually ever seeing it besides me but regardless. Mucho progresso made-o. Yeah I’ll never do that again.

Ok for starters there is now a mini to go with the main map which shows a spinning golden arrow to show which way you are facing. And to go with that the game now has a compass. Strangely enough that’s actually making it easier for me to not get lost in my own world (yep I’ve done it).

Here you see these new UI additions.

mapsmapsmaps.png

Ok moving on since the whole quest cycle is now finished (well it is now anyway) I need to branch out and make some surrounding areas more populated with things to do. I’ve started to make a narrow path leading to an old sage’s house. This meant I needed to make some improvements to my instancing and soft particle editors. They were both missing vital undo/delete functions.

It’s just way too annoying to reload the game if i place a bush I don’t want in the wrong palce or hack the data. Also to make the narrow path I had to use one of my spare ground textures from blendmap 2 (the first map is grass, stone, mud. The 2nd is cobbles, snow – for now and now sandy gravel).

Even that wasn’t enough to make a satifactory narrow path so I added in something I’d wanted for a long time: A color map. This basically allowed me to bright/darken or adjust the color of a 1 pixel of the terrain map. which translates to about 50cm squared. It just makes it possible to make things look more natural and will be very useful in the future.

Oh also I needed more types of long grass and bushes. Anyway those of you who follow me on twitter will already have seen the beginnings of this mysterious path.

path

So there’s the bushes and soft particles (a little ground fog/mist throw in) and here is the path itself with the next texture mapping and color map. Subtle but then it’s meant to be an old worn path. I’ve turned off one batch of foilage temporarily so you can actually see it.. Pretty effective I think.

path2.png

Ok and there’s more… well at lot more in terms of coding.

NPC now support multiple animations finally and they can roam following paths and play a specific animation at each step at whatever speed is selected.

So now we have woman with a slightly angry walk following a triangle i’ve laid out for her to follow. Maybe she doesn’t like triangles.

 

At least she has a shadow.. as do all the NPCs now and that’s the final major thing that was added. Next up I’ll be be adding said sage and battered house and maybe a broken cobble path to some spooky ruins.

The fun bits basically!

Until next time.

Building Builders

It’s not all sunshine and roses or whatever the expression is…

The last week or two were spent making “builders” to help my make my villagers (and other monster type things) behave how I want them to.

As you can see I ended up needing a bunch of panel of info to make a quest builder. This allows me to make quest steps of all different types (kill things, collect things, find a special thing, speak to someone orĀ  go to a err special place). I can order them or allow them to be done simultaneously along with set any relevant text dialogue for the various NPCs.

This was a large (and not particularly exciting) slab of coding but hey, it’s done now. So now I can add 1 or more quests to an NPC.

In other news I had to do something about the bounding area of an roaming enemy. They can roam around in their area just fine but what about if they’re attacked (and therefore start to run after you) and get to the edge of their area? Well my solution was to allow them to go to twice the side of their bounding area once they’re attacked and if they get to the edge of that (ie that would probably mean you’ve run away) they will give up and spin around and head back to their area. While they’re heading back they’re also unattackable. This is pretty much how it works in Final Fantasy 14 and Everquest (not sure about World of Warcraft as I’ve never played it) and various other RPGs. I’ve never been 100% happy with that solution but the alternative aren’t that great either (monsters that chase you forever or you being allowed to just stand outside the monsters area and pick them off from range).

We have a new NPC type too. Female Peasant Roamer NPCs. Handily I found a way of using the same skeleton from the Male Peasant NPC so therefore I can use the same animation. At least as a base anyway, I can always tweak it.

This then means I need a “roamer builder”. She can’t just randomly roam around like a mad woman or zombie so she’ll need to follow a “script”. For now it’ll be moving from A to B, pause for x time, turn left/right. She can play a selected animation along with each step. With those step types I should be able to make her wander around the village in an eventual loop. Much like the West World characters although she won’t be quite as intelligent.

Some smaller stuff. The player now hold’s he weapon properly and I added a sparkle to follow his weapon when he attacks, like so:

stab.png

Oh and when a monster is killed it now updates the quest journal with a message to say that the player needs to kill more or that they’ve finished that step of the quest (also with a green tick). I’ll need to make it so you get your reward soon!

journal.png

And finally the slope is now checked to prevent you walking up sheer surfaces although that’s not perfect yet since you can turn at a shallow angle to the surface and creep up it slowly but I’ll fix that later by checking the slope angle (as suggested by a nice guy on the Monogame forum).

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…