Tuesday, 16 April 2013

Soundtrack

Recently I have done work on the soundtrack. I had very specific ideas for the soundtrack which I believe i have succeeding in realising. Through the use of Reaper I manipulated tracks to get the sound I wanted.

The tracks for exploring the and wandering through the game while out of combat I had very specific ideas that I succeeded in executing. I knew from the very beginning; I wanted Pokemon tracks but not the 8 bit sound. I found the exact tracks I wanted so it was just a matter of editing them. The reason I wanted this music was because I have always admired it from a young age, and it always struck me as surprisingly atmospheric, even considering technological obstacles. The main change I needed to do was to male sure these tracks were slow, almost to a crawl, to represent what the player was experiencing; a dungeon crawl. Also I lowered the tracks down an octave to give it an earthier bass sound, again, representing the environment. Threw in some reverberation too to make it echo as it is set in a cave.

For the credits song it had to be a heavy metal rendition of a theme song and I thought what better than the Elder Scrolls theme? It's vast and epic and perfect for our game.While I would have liked to perform it myself I lack the technical ability. So I found exactly what I wanted after some sleuthing, and it was perfect. There's something about it that just instills a sense of victory and power and I thought that would be great for players to experience after completing the game, as that is how the player should feel upon beating the game, any game for that matter.

So while my soundtrack work is pretty much done unless there are any issues, I may continue and do more. Who knows, I could come up with something cool that could work with the game. I think I'll continue to experiment.

Cheers everyone.

Thursday, 11 April 2013

Sound Effects

So for Beards & Axes another task I had was to create sound effects. The most logical first step was to create a list of sound effects that I felt were needed for the game, as follows:


  • Footsteps (Earth/Rock)
  • Footsteps (Wood)
  • Weapons clashing
  • Weapon successfully hitting
  • “Button has been selected” sound
  • Low health sound
  • Door opening/closing
  • Potion drinking
  • “Just picked up loot” sound
  • “Battle has begun” sound
  • “Battle ends” sound
  • Weapon Swinging
  • Game Over
  • Wilhelm Scream
  • Enemy Spider Attacking
  • Enemy Spider Hitting

In one sitting I managed to make all these sound effects. By using Reaper I manipulated individual tracks to create the sound I desired. Currently we are learning to use Reaper but I have used it quite extensively a number of years ago when I was doing and evening course in Sound Engineering, and also as hobbyist guitarist recording original compositions so I believe I had a good advantage in this area.

The tracks I used were a mix of my own original recordings that I recorded a while back for an assignment, and some tracks I found online which I used because the sounds I required were unrealistic for me to record myself, and i would not have had the means to do it myself.

Next up, the Soundtrack!

Wednesday, 10 April 2013

Texturing The Models

One of my most recent tasks was to texture the 3D models that I had already made. This at first proved to be quite daunting, as I had made roughly 40 models. The sound of texturing 40 models, as you can imagine does not sound like fun, and would be even less when actually doing it.

My conclusion? Not too bad at all.

Now I'm not great at texturing, at least wasn't before I began this, but it proved to be a good learning experience in improving my work rate, and my fluidity while texturing. Less mistakes were being made as I went along.


^ Not bad eh?


^And another

I was thrilled when I actually managed to get all the texturing done in one sitting (albeit one, which I forgot about due to delerium via exhaustion). I thought getting it done in the one sitting would make the most sense as time is a precious commodity at the moment.

Look out for another blog post or two on the topics of Sound Effects and Soundtrack.

Cheers!


Character Weapon Mounting

Being an RPG, we need weapons. But while weapons sitting in a nice rack is all very well and all, this is not Skyrim, so kitting out your Whiterun house with lovely looking weapons that you'll never use is not our focus here.

Paul M created a collection of weapons for our character to us, with pickaxes, doubled bladed and single bladed axes as well as a few other objects that could be used for bashing. Also included was three different types of shield. My problem was getting our character to use them.

After a push in the right direction from our constantly helpful lecturer, I discovered mountpoints. These are essentially empty gameobjects where the weapon will instantiate when we need them to. These can be placed all over our character where we need them, but for our current schedule we will be sticking to weapons and shields; the right and left hands.

After some research, I decided to add the empty gameobjects directly in Unity. While this could be done in 3DS Max as well, including doing more complicated things with bones etc, with the Dwarf model not being my own, and time contraints, I didn't want to go messing with it if I could avoid it.



As stated, weapons and shields will then be instantiated at the postion of these mountpoints. A useful feature too is instantiating them at the same rotation of the mountpoints. As each of our weapons will be held in the same way, this is very useful. While initially tedious and needing some trail and error to postion the mountpoint correctly, after plenty of testing, they were working exactly the way we wanted them. Parenting the instantiated weapon then to the mountpoint (done in the code) meant that each weapon would animate along with the character. While all our weapons use a simple chop animation, items like spears could be done in the same way. The spear would go to the mount point, and then the code would point the character to a separate 'thrust' animation. This means that when creating a character, you would be animating only individual actions, not individual animations for every single weapon in a game. 

For anyone looking to do something like this,  a simple piece of advice is to have all your weapons in your modelling programme at (0,0,0) and at the same rotation.


Once the weapons were coming in at the right place, rotation and animating along with the character, it was a simple matter of making the weapons function, ie, change the code in the player stats so each weapon does different damage. After a brief chat with Petr, who is doing all the actual equipping and GUI code, we decided it would be handier for me to do this, as then we could have all the weapon code in one separate file, with each weapon or shield with its own individual function. Then on Petr's end, it would be a simple matter of calling each function from the weapon code file when it is equipped in the inventory system. Here's an example of one of those functions:



function EquipSingleBladedAxe1 (){

      Destroy (mountedWeapon);

    var axeSingleBladedInstance : GameObject = Instantiate (axeSingleBladed, weaponMountPoint.transform.position, weaponMountPoint.transform.rotation);

    axeSingleBladedInstance.transform.parent = weaponMountPoint;
    mountedWeapon = axeSingleBladedInstance;
   
    playerStats.weaponLowRange = 1;
    playerStats.weaponHighRange = 6;

}

An important part worth noting is the 'mountedWeapon' variable. This is so the code knows what is currently mounted by the character, so that when he goes to equip a different item, the currently equipped item is removed. 
The weapon damage is then in the two range variables at the bottom  — in this case, this weapon will do between 1 and 6 damage each hit. This is then added to the character strength giving the final damage output, from which the enemy armour class is deducted giving the actual damage dealt.

The shields work in a similar way, only they affect the armour class stat of the character. While originally we only had the one armour class variable, I split it into various elements while doing this. While for this assignment, we will only have shields, and hence will only need the one armour class variable, in future if we were to add armour, gauntlets etc I thought it would be handier to spilt out each and then bring them together in a forumla.

So for example, if a character had a knight shield (Shield AC 3) plus heavy armour (Torso AC6), adding these together would give a total armour class of 9. Then if the player was to equip the great knight Shield (AC 5), the character's armour would be 11. If we were to have all the armour in just one AC stat, and the add or take away integers from that, it would be too easy to end up with a situation where once you equip something, a permanent or semi-permanent change to the AC stat could be made.













The Cast List. Now looking pretty.

Another long one here. The last couple of weeks from my end have been on the characters; our spiders and ever patient Dwarven hero, who had been sitting on the sidelines for far too long.

Firstly, our spiders. The problem I discussed here a couple of weeks ago has been fixed. While still not 100% sure what the problem was, I narrowed it down enough so I could fix it. The main issue was with the .fbx export, where the skin were coming away from the spider bones on one side. The bones still animated the legs, but because the legs were off line with them, the legs animated into the spider. I'm pretty sure that this was due to way the spider was modeled. Not everything was fully attached, and the legs and torso objects were separate meshes. Though why this only affected the legs on one side, I still don't know.

But that's been fixed now. The spider had to remodelled in places so it forms one complete mesh, with each vertice connected, extra edge loops added to the leg joints as well as numerous other minutia that's far too boring to go into. Unfortunately this meant that after all that had been done, it had to re-rigged and re-animated which took up more of our ever decreasing time.


So we now have two different types of spiders, with the brown one pictured above a slightly flatter version of the smaller ones. A simple material was added to each to give them some distinction. In future for my own portfolio of work I will probably add a more detailed material, with eyes, fangs and more stylish abdomen, but with the view point of this game being the way it is, none of these features would be visible. So for time reasons, the spiders have been left as they are.



On to our character. With the deadline being the way it was, it was felt that we didn't have time to rig and animate an entirely new model. I attempted rigging Paul M's Dwarf character, but editing the envelopes was taking a lot of my time up, and I would not have been able to get that done in time. So a simple dwarf character was found online here that was already rigged and animated, which saved us at least a couple of days work and allowed me to focus on character equipment and stats.

Of course, things are never that easy, as the .fbx version of the Dwarf was missing his head.


One of those bizarre problems. But it could be worked around. The dwarf character also came with .obj versions of the model (which is simply the unanimated mesh). From this file, I detached his head and brought it into the .fbx version of the file. To this file, I then added some head bones, skinned them to the head and then attached both the bones and head to the headless dwarf. Amazingly, this all worked out perfectly.

This character came already with all the animations we needed and some extras too which was great, and saved me days of work.


Following this post will be another one, going more in-depth into the character and equipment mounting.












Thursday, 28 March 2013

GUI - Health and Mana Bar

Today i was working on another part of GUI for our game. I created Health and Mana bars inside a GUI.Window. Interesting thing about GUI.Window is that for each window you need a unique ID number which you will be using as a parameter in your function.
Here is code snippet form my GUI script, it's nice and simple.


























I was using Event.current to see if my Hp and Sp values are changing. Later on we will have to modify this script to be able to use Paul's PlayerStats script. Health bar is also dragable same as Inventory window which is giving User an option to position all GUI panels in a way he/she likes it.

And this is how it looks like in the game now.



 I'll keep you posted with more upcoming GUI.

Wednesday, 27 March 2013

GUI Inventory part 2

It's been a while since my last post about GUI, so here is a little recapitulation on what i have been doing. There is a massive amount of things one can do in GUI., one from the things i learnt is that not everything does have to be in OnGUI() function. Another handy thing to use was a discovering a UnityGUI event which i used instead of Input.GetKeyDown.

Events correspond to user input, or are UnityGUI layout or rendering events. For each event OnGUI
is called in the script; so OnGUI is potentially called multiple times per frame.
Event.current corresponds to "current" event inside OnGUI call.


I have also loaded CSV files into my inventory GUI and used their values to be displayed in Inventory window.There is still a lot of work to do but it's getting to look well i think.
Thanks to Noel items can be now moved from Loot objects into Inventory, which was a problem for so thanks for that. I will discuss Loot script and chest object in a next post.

Character and Enemy Audio Recordings


Today i begun audio recording for Main Character voice and few enemies as well, together with audio samples for interactive game objects("chest, "shrine") also voice message for entering into spider area,
3 different versions of Orc voice's together with the reply from Main Character.
In this process we recorded each line several times to ensure the best output.

The storyline is player will load into the start area and when reaching the entrance to the mine,
the first use of the days recordings is used in the game. I am aiming for kind of a Dungeon Master style of voice which will lead the character through the game. When Player reaches the Orc, dialog was recorded for a brief conversation between the Orc's..

I am about to begin modifying those files to incorporate them into the game.


Tuesday, 26 March 2013

More Environment, Attacking Dynamics and Spider Crawling

All sorts of things have happened since my last blog. So here's one super blog.


The environment is properly up and running now, with lighting, particles systems and clearer textures. All the edges needed to be smoothed so the textures could be painted on and look correct, not skewed like they were before. Lighting really brought the mood we were talking about when designing the game. It really turned it from looking like a 3D programme to looking like an actual game.



The fighting mechanics are up and running, making some liberal use of state machines. All work was done with a demo skeleton found for free on the asset store (a pretty nice pack which can be found here). This was mainly done so we could prototype as much of the code as possible, with animations as well.
The code was also done up in a way where anything that could be summed up into a variable was, so hopefully once we start bring in .CSV files to store all our statistic information, that will help with the work load later on.



We haven't had a chance to demo the character attacking animations yet, but everything else with the character code is working, bar a few GUI additions. A navigation grid was brought in to help with pathfinding (the enemies also make use of this). Once that was added, the camera follow script needed to be changed to get it back to the way it was, which ended up actually improving the control of it.
Attacking works with a simple click and raycasting, which is the method used for all control of the character (such as picking up items and eventually, using levers, etc) to keep it all as coherent as possible.


At the moment, I'm working on our first enemy, the spider. After a day or so spent modelling and animating it (learning how to rig it was the hardest part, my 'ctrl Z' keys are in tatters), I've brought it into Unity and am encountering a few problems, mainly with the animations not being as clear as they are in 3DS Max. But the good news is that they are importing and working with the code.



The above is the Spider in the middle of its attack animation. As you can see, some of the legs actually move into the Spider's abdomen while doing so, which doesn't happen in 3DS Max. Something similar happens during its walk cycle as well.
Though as least these are all cosmetic problems, which I'm confident of finding a fix within a few days.




Monday, 25 March 2013

Character Modelling

Hey all, this past week I have been character modelling. I spent quite a lot of time building my own character from scratch, by following youtube tutorials. The model was ok but very messy in parts and almost unfixable, vertices and polygons all over the place. So after this ordeal I decided to begin editing a pre-existing character model I had into a little dwarf looking fella, here he is:


He isn't fantastic looking but he's getting there. He needs to be smooth looking. While admittedly the detail required for this particular model isn't huge, I still want it looking as good as I can make it, with the time that I have. As you can see I have started texturing the model now, and then I need to make animations for the characters various states. An update in the form of a post about animation will be coming soon, so stay tuned.

Stay classy, Paul M.

Thursday, 14 March 2013

3D Modelling Pt. 2

So another week, another weeks worth of models created. As it stands at the moment I have made over 20 models now for the game and counting. There's still a number of models left to make which I'll be tipping away at. Here are some examples of what I have done over the past week:

Lantern:

Treasure Chest:

Battered Rectangular Table:

^ For some reason a lot of the detail in this model is not rendering, don't know why.

So it's been a pretty productive week modelling wise. I have gotten a lot done. Not only have I made a huge chunk in the static objects that needed to be made, I began work on items that are interacted with, such as the treasure chest above, varieties of potions, and a lever. There are still important items to be made, in particular weaponry, but for the moment my focus has changed to creating the main character, the Dwarf. First opportunity I get I will be starting work on him, and he will be a bad ass. He'll be as strong and haughty as a true Dwarf should be.

Next week, I will have some screens of the character to show, so watch this space.

Stay classy, Paul M.











Thursday, 7 March 2013

3D Modelling

So over the past couple of days I have begun creating some 3D models. I'm currently working through a list of 3D models which includes various mining equipment, furniture, rubble and stone etc. Here are a couple of models I have completed so far...

Campfire:

Minecart:

Barrel:

I have a couple other models made too, different types of rubble, a torch, a round table with many more models to come. There's still many more models on the list to work through. Thankfully I've become very comfortable using 3D Studio Max, and I feel that I am growing in confidence with my ability to use it. I have found it quite enjoyable thus far creating these models and look forward to creating more 3D models and completing the list that we have, and more. I'll undoubtedly be blogging about this again soon, posting pictures of newer models and progress I have made, so watch this space.

Stay classy, Paul M










Wednesday, 6 March 2013

Environment Ver. 2 & Making it Interactive

This week I've been mostly working on the Environment again, modelling the large items integral to the level and honing the rest of it. All modelling work thus far has been in 3D Studio Max.

I was reluctant to use this programme because it is PC only but I gave in and installed Windows 7 on a Bootcamp partition on my Mac over the weekend. Predictably this took almost two full days to do due to the usual Windows related technical problems, but the initial awkwardness should be worth it. This will make the group's workflow more streamlined from now on, as we are all now working in the same modelling environment and it is on all college computers.


The main part of this is the broken bridge. This is an integral part of the level and its storyline, as it is the cause of the orc group being separated and means our hero has to venture into a deeper (and scarier) part of the level to circumvent it.
Integrating it with the Unity Terrain editor was initially flagged as a potential problem, but it turned out to fit in perfectly on the first go.
The bridge was created unbroken initially and then broken manually in 3D Studio Max.


As well as the Environment, I've been working on some other prototypes.

The first prototype is a simple pickables script, where the character is able to interact with items, pick up weapons and potions. This was easy to implement, with a function OnMouseDown()doing most of the work. Integrating this with Petr's Inventory and GUI code however will be the difficult part.



As well as this, a simple enemy AI script was created based on Vectors, with a working prototype at the moment with a cube chasing our ever valiant capsule hero, stopping when it reaches a certain distance to him. It also looks at our character as it moves around.















Tuesday, 5 March 2013

Audio (Soundtrack)

So I thought that as we are working on a game that is inspired by the likes of Baldur's Gate and Diablo, why not do a version of one of these themes for ours?



So I'm thinking the Baldur's Gate theme, why not? It's sweeping and epic, and thankfully very easy to play on guitar so I've learned! So combining guitar emblazoned with effects, and Petr's idea to add war drums to give a big fight feel, this should result in something suitably epic and fitting.

Also some other ideas I got knocking around for the soundtrack, mostly for just wandering through the environment are inspired by the likes of The Dark Knight's Joker theme, and cave music from the Pokemon game series. True story. Sounds ridiculous, but it'll work. Trust me. ;)

More to come soon, Paul M

Thursday, 28 February 2013

Character & Enemy Prototype

So I have been tasked to create prototypes for the characters and enemies, both models and animations. The best way I thought to create these was to at first break down the animations that would be required for the models, I broke them down as the following; 1. Walking, 2. Attack State, 3. Death, and 4. Rest State. This provides me with a clear end goal, achievable targets. For the character prototype, I am using an edited model of a dwarf (Here's the original model below):


For the enemy prototype, I was asked to do the spider enemy type, but due to crippling arachnophobia and an aversion to typing anything like "giant spider" into Google, I decided it would be best for me to do the Orc enemy type. For these models also I have a text document of links to the websites where I acquired them, just for reference.

Also, apologies for being behind schedule a bit, as I'm sick with the tail-end of the flu, and a throat and chest infection and it's only getting worse again.

Soon to come, further post(s) about these prototypes, and audio design!

Wednesday, 27 February 2013

GUI - Inventory or where the hell is my window gone



Since we are working on RPG game, we will be using a lot of GUI, therefore I am trying to come up with an InventoryScript for the game. Having a little experience from building a MainMenu scene based on GUI before, i thought this would be good opportunity to use knowledge i've learnt so far.

First I thought of using GUI.Box and simply draw buttons representing an empty slot in the inventory. After that I tried GUI.BeginGroup and moved everything inside some function which I called in Update function afterwards. Did not work anyway, also i have found out, that using a GUI.Buttons as an inventory slots is causing framerate to drop.

There is possibility to use a GUI.SelectionGrid and GUI.BringWindowToFront together with GUI.DragWindow. In a perfect world i would use two GUI.DragWindow with GUI.SelectionGrid. One for the Player's equipment 'armor, helmet,...' and second for actual inventory. But we are not living in perfect world, right and positioning wasn't that easy how i expected. 

The last but not the least is a use of 2Dimensional Arrays., this is actually approach which I am taking right now. I hope that somehow I will be able to move my inventory Array inside DragAble Window and have a freedom to move with it. I have got the basic skeleton for this it's just matter of time i think.

Tuesday, 26 February 2013

Character Controller without Character Controller Component




I've been given a task to build a prototype of a Character Controller. At the beginning it all seem to be easy enough task to do. After a short research on UnityWiki i found a ClickToMove script, which is actually perfect for this game, but it has some drawbacks as well.
Game Object is ignoring walls and going right through them or falling through the plane, applying rigid body to Player object does not make any difference.
While facing these difficulties i've came up with perhaps not quite perfect, but workable solution. We have own ClickTo Move script, which is working for the purpose intend to. 
While working on the Character Controller I've asked myself, 'do we really need to change the actual look of the cursor ?' I thing 'yes', therefore as an addition we have a script, where the cursor is changing it's 2DTexture for both, attack and move. Setting up more textures such as search or use item is optional.
The last part is adding a shadow, this has been achieved by using a projector and moving player to a different layer.
Next goal will be tweaking Character Controller script and APathFinding system as well.

Monday, 25 February 2013

Level Design Prototype and Camera Viewpoint

This week, I've been mostly involved with the level design and creating our level in Unity with the Terrain editor.

The basic design for the level is below:


Making this in Unity has led to a few problems, mostly with regards to the camera and elevation. We want the camera to remain in a fixed position as much as possible (keeping in mind the likes of Baldur's Gate, etc) but we'd like it at a mild slant (so it's not fully top down). A few prototypes with the camera (Unity's built in 'Smooth Follow' attachment has been a useful starting point) have it mostly how we would like it, but there are still a few issues here and there with the camera hitting the terrain and then going through it.

To make this in the Unity Terrain editor, rather than starting with a flat surface and building up, I created a large plateau and then worked backwards; almost like carving the cave structure out of the mountain. I think this gives me more freedom when working with this level and its evaluations  and for future levels. 

The Terrain resolution is set at 250 x 250 x 500; the default terrain is far too large for our purposes. The plateau is then set at 25 high, with the average level height (which is the level at which the player starts on and moves on throughout most of the level) being at 15. Upper walkways are at 20.



At the moment, I'm working with just a basic rock texture and hollowing out all the main areas. Areas like the building structures (to the right of the level) will most likely be built in 3DS Max or Maya and then imported into Unity, as creating straight, man made walls, etc is a bit unwieldy in the Unity Terrain Editor. They will then sit into the cave structure above. The two bridges (both broken and unbroken) will also most likely be built in a separate 3D modelling programme; I've added the rock bridges above purely for testing purposes.

This level will be added to a lot as we go on, but it's useful to have a starting point now so we can prototype camera and user input in an environment that will be much like the final level design.



Tuesday, 12 February 2013

Beards & Axes, The Beginning.

Hello all and welcome to the project blog for our game project, Beards & Axes; an RPG built with the Unity 4 game engine, taking inspiration from games like Baldur's Gate and Icewind Dale, with a few splashes of Diablo in it. And we'll probably stick some Arx Fatalis and Dark Souls on top of that too. Thief has even been mentioned.


We'll be posting regularly here to keep you up to date on our project. We'll throw up screenshots, ideas on what direction we're going, maybe even some handy tips and tricks on working with Unity and 3D Studio Max, among others.

At the moment, we're finalising our level design. We're hoping to have a fully playable level working by the end of May with about 15 to 20 minutes worth of gameplay, customisable characters, at least four distinct enemies and an environment that is immersive, haunting and great fun to play. The most recent Project Documents, along with our game design document, can be found at our Project Website Documents Section, but I'll give you a taster of the story here.

Overview


This is a world where hammer blows crush and swords rend. Evil beasts will happily tear you limb from limb and even the ‘friends’ of your homeland are looking out only for their own needs. Our characters will need their wits about them to survive in this place. And don’t forgot to bring an axe.

Beards & Axes is set on a continent that has been invaded by a battle hardened and terrifyingly powerful force fleeing their own homeland. Bringing with them strange new weapons and tactics unheard of by anyone, this force quickly gains a solid foothold in the country, though few know of their intentions for this land, or for its inhabitants.

A Brutal & Visceral Land


But these wider concerns are of only passing interest to our protagonists.  Finding themselves lost deep within a disused mine located near a large, recently conquered city, our heroes must find their way out. Previously a source of powerful, magic gems, the mine was abandoned over a century ago due to cave-ins, disease and dark rumours and omens. Ancient evils lie buried underneath and having been disturbed over a hundred years previous, they are now ready to make their move.

Worn down by war and sick of life, our characters quickly discover that maybe their own problems aren’t quite as isolated from the rest of the world as they think.