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…

 

 

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…..

 

Rats and Shopkeepers

It’s been a couple of week since my last post but that doesn’t mean that not much has been done in term of getting the world together.

First up I worked on getting some nice dialog boxes (and a font (SpriteFont if you’re interested) and a papery texture for the font to go on. This was inspired by Final Fantasy 14 (ARR)’s dialog boxes but it’s not close enough to get me sued. Could someone sue you over dialog boxes being too similar? Probably.

Anyway after fiddling with fire some more I made the editor able to handle animated models better and fixed up a really deeply hidden bug in the instanced grass I moved on to getting some new trees and bushes in. I added total of 7 types of tree, 3 flowers, 2 bushes and 2 shrubs. That should be plenty to keep things looking interesting.

Here is a video of a few of the things I just discussed.

NPC’s can now have a ton of attributes edited as you can see from that video. I followed one of my one roam rats all the way to a mountain to see if it would roam the terrain nicely and it did. It’s amazing how watching something you wrote actually work can bring you so much pleasure.

Until next time..

 

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.

 

Terrain Following Rats and Death

A bit of a weird and overly dramatic sounding blog title but anyway..

Ok more stuff behind the scenes. I’ve added load more attributes to npcs and made them editable. I realised I’d need my enemies to be able to follow the terrain like the player does but I didn’t account for the fact the non-bipedal creature don’t stay upright (like giant rats for example) when they run up hills. I guess humans don’t entirely but it doesn’t look ridiculous if they do.

In the screenshot above I’ve targeted a rat and I’m about to hit it with something and as you can see both rats look sort of ok but they should really be tilted to the terrain they’re on. I’ll have that working by the next blog post and that a promise. If you’re interested it’s not actually THAT complicated. Using the usual algorithm for calculating the height at an exact point of a triangle (you can find that anywhere on Elgooglado – no one call it that btw), you find the front and back height of the model and calculate the diference between and then using that different the angle you need to rotate the model about it’s X and Z axis. Not my work, some maths genius somewhere worked that out already so no need for me to devote my life to it.

ratterrainfollowing

This screen shot shows all the new attributes (I’m going to need a scrollbar or 2nd page for them clearly) and the terrain following kinda working. The rat closest looks good but the far one needs to be rotated sideways a bit (rolled in Roll, Pitch, Yaw terms).

Ok well the game interface also detects mouse clicks over the hotbar icons and whether something is targeted so now to make some basic combat code.

I also played with a particle emitter for blood splats or magic sparkles or whatever when you actually DO hit something but that’s not ready for public consumption yet.

Oh and the reason for “Death” in the title, NPCs can now be attackable (or not) and be dead. Right now if they’re dead they’re just rotated on their side. Obviously once I switch the NPC class over to using the AnimatedModel class they’ll play their death animation and end at the final dramatic pose.

Ok until next week: “Beware of Merinsard!” said the dark figure and rode away into the gloom.

Flying Rat Army

My screenshots are getting a bit less pretty lately but I thought it might be interesting to show how I’m going about adding enemies/NPCs to the game.

Using a variation of my normal entity (rocks, walls, buildings etc) editor I am able to move rotate and scale my errr monsters or whatever. From the screenshot above you can see there’s a panel with space for the rat’s attributes like health, defence, attack power and other stats.

I feel like some form of combat is on the horizon I’m taking a slight diversion to add double blend maps to my terrain so I can have snow on the caps of the mountains and cobbles on the floor in towns etc.

Still have the jiggly shadow from problem with mid range shadows but I have plenty of resources to read on how to fix that. Other than that everything is moving along at quite a pace finally.

Better when I don’t spend 2 months getting the fog to look just right.

Behind The Scenes Pt2

Well there’s not much to show visually. So much behind the scenes to do to get combat basically working.

Ok I needed to create an NPC class to store stats about them (just health, power, attack and defence for now). The player needed those too but that’s nice and simple.

I had to improve the editor so it would allow to be able to flip between editing static entities (trees, rocks, houses) and moveable, targetable things like peasants and giant rats.

That means I need to save and load npc data seperately. All the attributes about each npc.

.. yeah as I said it’s a bit of a boring update but it has to be done.

Oh one interesting thing you can see from the screen shot is where it says “rat hp” near where the rat enemy is. This is an UNprojected 3D coordinate of where the rat is. That means if he’s targetted you’ll be able to see his target arrow, name, health etc even through walls and stuff. That’s kinda how WoW/EQ2 work. Maybe i’ll depth sort it and NOT do that at some point but I like it for now. Comments would be appreciated.

I should be able to place roaming enemies and attack them soon. That sounds more fun.

 

The Blending of the Realm

Ok so lots of new stuff. Yay.

Firstly you can see there’s a working health and power bar. How power is used it’s entirely decided but it’s there and it works which is most important for now.

After all the behind the scenes stuff it was nice to just work on the game again. So now you can target other entities (NPC’s, animals etc) with the spinning targeting arrow. So there’s that.

I spend an annoying amount of time fiddling with the jiggly shadows problem which I promised I’d leave alone for now. It’s not THAT tough to fix I just haven’t figured it out yet. I will but I just don’t want to get too bogged down in a minor visual problem.

Talking of annoying problems, I wanted to get my peasant male/female models standing in a sensible rest position. I managed that eventually. I think I really need to leave SoftImage and learn 3DS though. SoftImage just doesn’t seem to like exporting FBXs that anything actually likes unless you do everything “just so” and even then you sometimes end up with a distorted mess.

Another big leap forward was the ability to be able to edit the texture of the ground using the editor (rather than the blend map in GIMP which just isn’t really practice in a 50km terrain). So this is exactly what I did, it’s not remotely perfect but I think you get the idea of the beginnings of it from the video capture below.

I’ll probably have to work out some kind of rudimentary combat soon. Kinda exciting.

Have a look at this:

Terrain Blend Map Editing 

Seeya next week!

 

 

Rats and Ruins

So this weekend I mostly worked on… no that’s a horrible way to start a blog post. Sound too much like a Fast Show sketch.

Anyway I worked on the UI some more. As you can see from the screenshot there’s now some actions assigned to the hotkeys. I’m not going to have the hotbar endless configurable like Everquest. 1: Because I personally think it’s actually annoying when you forgot to turn on/off draggable icons or you made the bar too small or big and you can’t read the chat or other ridiculous UI problems. 2: Console users will not really want all that anyway. they’ll just want to be able to assign an action to an appropriate console button.

I’m trying to keep it simple. So 6 actions assigned on 1 bar. Then you can flip to another bar with mouse (or use L2/R2 on a PS4 for example).

I wanted to get a health and power bar in this weekend but it’s not ready for this post. Shouldn’t be too long though. I’m planning on going with a bar along the bottom of the screen so it doesn’t obscure the play area too much or require your eyes to look around too must. It will be a double bar. Green at the top for health and probably blue or orange for power/mana/stamina or whatever it ends up being.

Moving on… I’ve started to add some ruins for some giant rats (first enemy) to wander around. I’m not amazingly happy with the look of the ruined walls. I think i make make them more mossy but it’s early days on those. They don’t blend in with the grass of the terrain where they are anyway so that will have to change.

“So much to do, so little time” as the Joker once said in the Tim Burton version of Batman. He also said “Ever dance with the Devil in the pale moonlight?” which makes less sense and has no relevance to this post at all.