Wednesday, June 11, 2008

First vendor complete

I now officially have my first vendor ingame. I've created the script and game component to display and operate a general vendor. the vendor has 3 options; Buy, Sell and Repair which all function correctly. the screen displays much like the inventory screen with all items taking up a slot in a collection of boxes, the player picks the item wanted and presses the buy/sell/repair button.

In the progress of developing this component I added more functionality to the inventory screen as it had to be able to find the first available slot to put a newly purchased item in. If the item is stackable and the game finds a stack of that type of item already in the inventory, such as a potion. it will add the item to that stack instead of taking up a new slot. At the moment potions can be stacked upto 10 per slot.

it also recognises that there is more then one potion per slot when selling them and only reduces the quantity by 1 instead of removing the whole stack.

along the way I also decided to add some temporary character portraits to the game as part of the npc conversation script. Each character has their own portrait and the portrait displayed will change depending on which character is talking. Eventually when I get the real portraits they will have multiple versions displaying the character's current attitude/emotion to give more feeling to the conversations.

for the meantime I need to finish off the inventory screen before going onto my next big step which will be tooltips for when the mouse hovers over items, displaying the stats of the item and its sell value and such. But firstly I need to improve the inventory system to allow switching around of equipment and a way to easily identify which slot is what on the character model as right now it is just a bunch of empty squares and currently once items are equipped they are stuck, that will be a quick fix though.

The inventory side of the screen already allows for moving around items and if you try to move an item to a square already occupied it swaps the items around and you will be holding the other item instead so that you can put it somewhere new.

I should have the tooltips ingame before the end of this weekend hopefully.

Saturday, June 7, 2008

Combat Engine Complete!

for the foreseeable future the combat engine is finished. I'll likely do some polishing to it as time goes by but essentially it does everything needed.

the last few modifications made to the engine include the ability to evade/block attacks based on an agility formula, as well as the player and mobs may fail to hit (miss) their target based on a dexterity formula.

Also added is the chance to cause a critical hit which is also based on the player compared to mob agility.

along with this I have also added a combat log to the game so you can see exactly how much damage or blocks/misses etc are happening, as well as important system messages and experience gained. At this point the log does not save old data and I have not made the log text scrollable to look back at old text, I'll probably add that functionality in the future, but for the meantime it does remove old data and scroll upwards when the box is full so that you can always see the latest text. It can currently hold about 10 lines of text.

like all hud components the combat log can be closed and expanded to save space when not needed.

I've also added multiple effects from the use of items, not only does the shield increase the player's defense rating, it now has the bonus effect of adding 2% to block chance and the weapon adds 1% to critical hit chance.

This is heading towards 'special effect' items that add extra bonuses to the player stats like in action rpgs such as the Diablo series.

I realised after making the last post that there is more left to do then I thought :(
I've yet to implement the currency and vendors systems. at the moment NPCs can only talk to the player, there are no shops. I think I'll work on that next.

Wednesday, June 4, 2008

Equipment in Combat

I've made some considerable progress with the inventory screen. I've added a weapon and shield to the inventory that is equipable in the correct slots and has a considerable effect on combat. the weapon increases the attack stat of the player and the shield increases the defense stat of the player.

as promised, with that done I'm uploading a new video to blip that demonstrates the new items in use, including the previously mentioned potions.

for the meantime the items are all using temporary graphics I found until the proper ones get made up.

next step I'm going to implement dodging/blocking and critical strikes to combat. All thats really left to implement in the game engine is the Quest system, Map screen and Save/Loading of actual game progress as well as putting the last finishing touches on the combat system.

Some of that though I won't actually implement until I start making the actual game maps which means waiting on graphics for now. I'm still in need of creating the majority of tiles needed to produce proper maps.

So stay tuned for the next post which should finally be the completion of the combat engine.