Another nasty bug fixed

I spent the last 3 days with a nasty bug, I almost went insane…

When opening a chest, the loot normally goes into the visible character’s (currently selected) inventory.

But if this character’s inventory is full, then the game will find the next character with enough room in his inventory.

The problem appeared when the next character had more then 6 items already in his inventory. The game tried to shift every item in his inventory to the left, so the new item will be the one selected, this way the player can see instantly the last looted item when browsing the inventory.

Everything stopped, nothing worked when clicking, the game just stuck.

The problem was so simple, that I’m embarrassed I wasted so much time on this bug… It was a simple do-while loop that never ended, infinite cycle.

The problem was that Unity started the do-while loop faster then Debug.Log function calls, so even if I put 20+ Debug.Logs before even entering the function that handles the opening of the chest, to see where it goes wrong, it wouldn’t show anything at all. I had no clue in which function was the problem (have 100+ functions already)

Oh well lesson learned, always check while and do-while loops if everything stops 😛

I tried to implement random generation of enemies (now it is static, same enemies appear in the dungeon rooms) but all I could think about was this bug… Now that it’s fixed I can continue with that 🙂

Quick update: adding new characters to parties bug fixed!

Just a quick update to let you know about a fix.

I managed to fix a nasty bug that got out in the last update, if you added a character that was alone in the party, and it was higher in position than the loaded party, then that added character would disappear.

Unfortunately this update will reset the game again, I hope it’s for the last time 🙂

 

The alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

Adding characters to party + faster saving and loading

WARNING this will reset the game again! You can find an older link in the post beneath this one.

Finally adding characters to already loaded parties is working.

12

It took a while because I had the same problem as deleting parties, copying a character took more then 15-20 seconds on android, but this time I couldn’t use the double array trick, because I needed to read and write the data to a new place.

So after searching way to many hours on google for a solution, I finally found this page:

http://www.previewlabs.com/writing-playerprefs-fast/

It replaces the entire PlayerPrefs library and it is so good that every saving and loading got almost instant! ^_^

On an older android you still wait ~1 second but it’s better then 20 seconds 😛

A little warning: there is a weird bug, if you create a new party, please go out to the Main Menu and reload before adding a new character, for some reason it does strange things if you try and add a new character as soon as you enter the town for the first time. I’ll look into that tomorrow, I just wanted to release this update today.

 

The alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

Deleting parties

BE WARNED! This version will delete all parties, characters and the explored map, it will reset the game.

I added an old version, so if you have a lot of parties and you want to continue testing with them please don’t load the normal link, instead load this one:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_oldVersion/Dungeons_of_Orroth.html

This old version has deleting of parties implemented too, but it’s very very slow…

So I had to redo the whole deleting system.

The problem is that on webplayer, deleting works fine(if you have a lot of parties it will be slower, but acceptable), but on android it took over 60 seconds to delete a party…

Unitys PlayerPrefs is very very slow. I tried to copy every party beneath the deleted one, by shifting them 1 slot, but reading and writing thousands of data is just impossible with PlayerPrefs.

So I had to come up with a solution to delete just the current party:

– I made another array in PlayerPrefs which holds the true numbering of parties, let the old party numbering to increase, and link these 2 arrays together

– Example:

– real party numbering: 1 2 3 4 5

– old party numbering:  1 2 3 4 5

– after removing party 3 and 4, and adding another 2 parties:

– real party numbering: 1 2 3 4 5

– old party numbering:  1 2 5 6 7

This way I only delete the selected party. In case you wonder why didn’t I just delete the current party from start, it is because the PlayerPrefs loading system, it needs to have an array of numbers that are incremented only by 1 (for example: 1, 2, 5, 6 is bad)

 

I thought I would do deleting pretty fast but sometimes coding is a pain 🙂

Anyway I’ll implement the adding of characters to the current party, I hope this will go faster.

 

The new links to alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

Kicking characters from party

Hello, I’ve been away for a little while, I got burned out of coding after Ludum Dare, so I had a little vacation 🙂

Anyway, now I’m back and restarted coding, and here is a little update:

I implemented kicking characters from the current party, they will show up in the load menu as a new party with 1 character.

1

 

Next I’m going to implement adding new characters to party, and deleting unwanted parties from the load menu.

 

Links to alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

 

Creating and loading multiple parties + Preparing for Ludum Dare 30

Hello, as the title says I added the loading screen, now you can create multiple parties and you can load whichever party you like.

1

 

You can click/tap to select a party, if there are more then 3 parties you can scroll with mouse/finger or use the up/down arrows(the one above the Back button), and you can load either by clicking/tapping the Load  button, or double click/tap on the selected party.

You can create as many parties as you like, but beware of webplayer builds, it can only save max 1 mb of data, so if there are too many parties there is a chance it will screw things up…(need to limit the number of parties on webplayer later).

Delete doesn’t work yet; kicking from parties and joining new characters to parties doesn’t work neither; I wanted to make a blog update only when those were ready too, but Ludum Dare is coming this weekend!

http://www.ludumdare.com/compo/

Ludum Dare is a game programming challenge where you have to do a game in 48 hours, solo.

It’s the first time I participate in a challenge like this and I’m excited 🙂

The tricky part is that I’m the one who will have to create all the art, sound and music for the game, this is the reason I stopped working for a few days on Dungeons of Orroth: I don’t know how to create art, so I started learning how to use Gimp, Blender and some audio software 🙂

My goal is to finish a game, not to win, but I heard even finishing is hard… so wish me luck! 🙂

 

I have some bad news too, I tried doing an iOS and Windows Phone build, but working with Apple is really hard…

I can’t build anything if I don’t have an iOS Developer account which is 99$/year. This is a lot for my right now, because I need to pay the last year of college and I don’t have any job = no income(I have saved money for 1 more year of living).

But even if I’ll make a developer account I can only test on maximum 100 devices… so there will be no alpha iOS build link.

The windows Phone is not that bad, but there is a trick too: even if I put a link to a WP build, you need to have a windows phone developer account to be able to install the build.. so no alpha WP build.

 

Links to alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

Guild changes + Ninja and Druid skills!

I redesigned the guilds, I wanted to add some guilds that were more known, and redesigned the way alignment and race  influence the guild selection.

  • Villain became Druid
  • Scavenger became Barbarian
  • Sorcerer became Shaman
  • Wizard became Warlock
  • Healer became Priest

 

  • Ogres and Trolls can’t be Good aligned anymore
  • Morlochs can’t be Neutrals
  • Dwarfs and Osiris can’t be Evil.

 

  • Elves can’t be Paladins or Barbarians
  • Giants can’t be Ninjas, Druids, Thieves(they are too big), Mages or Warlocks
  • Gnomes can’t be Paladins, Druids or Barbarians
  • Dwarfs can’t be Ninjas, Druids, Mages or Warlocks
  • Ogres can’t be Paladins, Ninjas, Thieves(they are too big), Mages or Warlocks
  • Morlochs can’t be Paladins or Druids
  • Osiris can’t be Warriors, Paladins, Ninjas or Barbarians
  • Trolls can’t be Paladins

 

  • Good aligned characters can’t be Thieves, Ninjas or Warlocks
  • Neutral aligned characters can’t be Paladins or Mages
  • Evil aligned characters can’t be Paladins, Druids or Shamans

 

I added the Ninja and Druid skills:

Ninja skills:

1) Swift Strike: Extra weapon swing, + 20% damage

  • has 5 seconds cooldown
  • learned at level 2

SwiftStrike

 

2) Dancing Blade: 2 extra weapon swings

  • has 15 seconds cooldown
  • learned at level 4

DancingBlade

 

3) Kidney Shot: Extra weapon swing, stuns for 3 seconds

  • has 20 seconds cooldown
  • learned at level 10

KidneyShot

 

4) Mutilate: Extra double damage swing

  • has 15 seconds cooldown
  • learned at level 16

Mutilate

 

5) Thousand Blades: 4 extra weapon swing

  • has 60 seconds cooldown
  • learned at level 28

ThousandBlades

 

 

Druid skills:

1) Feral Swiftness: Attack speed increased by 30%

  • lasts 10 seconds
  • has 20 seconds cooldown
  • learned at level 2

FeralSwiftness

 

2) Rejuvenation: Heal any character by 3, + 1 every second for 5 seconds

  • heal over time lasts 5 seconds
  • has 20 seconds cooldown
  • learned at level 4

Rejuvenation

 

3) Bear’s Claw: +400% damage next attack, stuns for 3 seconds

  • has 15 seconds cooldown
  • learmed at level 10

BearsClaw

 

4) Ravage: Deal 18 damage over 6 seconds, damage will be taken every 2 seconds(6 + 6 + 6)

  • damage over time lasts for 6 seconds
  • has 20 seconds cooldown
  • learned at level 16

Ravage

 

5) Heart of the Wild: Buff all stats and life by 10%

  • lasts 30 seconds
  • has 60 seconds cooldown
  • learned at level 28

HearthOfTheWild

 

I’m gonna stop with the skills a little, I really want to make the creating and loading of multiple parties, adding and kicking characters from current parties.

 

Links to alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

Paladin skills

I added the Paladin skills and redone the entire skill system.

I needed to add healing, buffing and special skills like absorb shields etc.., and the old skill system couldn’t do that.

I was lucky that it went pretty smooth and fast, no bugs(haven’t seen one, please report if you find one).

 

Paladin skills:

1) Seal of Crusaders: Buff the damage you do by 10% (at least 1 damage)

  • lasts 5 seconds
  • has a 10 second cooldown
  • learned at level 2

SealOfCrusaders

 

2) Holy Light: Heal 5 damage

  • can heal any character
  • has 20 seconds cooldown
  • learned at level 4

HolyLight

 

When you press Holy Light a window will pop up where you can select who do you want to heal:

12

 

3) Judgement: Deal 20 damage

  • has a 15 seconds cooldown
  • learned at level 10

Judgement

 

4) Blessing of Kings: Bless a selected character, they gain 10% to ALL stats(at least 1)

  • lasts for 20 seconds
  • has 60 seconds cooldown
  • learned at level 16

BlessingOfKings

 

5) Divine Shield: Imunnity to ALL damage

  • lasts for 3 seconds (this will improve with more ranks)
  • has 99 seconds cooldown
  • learned at level 28

DivineShield

 

I’m working on the Ninja skills now.

 

Links to alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

Skills manager is working!

Last week was pretty good, I had a lot of time to code, so I finished the skills manager.

12

The idea is that you can go into dungeons controlling only 5 skills, but if you got more skills(learned by joining more guilds) then you can manage this skills in town. You can choose what skills will have each character, each time you visit the town.

I’m thinking of letting the player choose the skills in dungeons too, but I find it more fun like this, you need to think about what skills to bring along depending of where you go. Maybe there are some creatures in dungeon lvl 3 who are resistant to physical damage, then you need to bring all the spells you have, or some part is fire resistant, so you need to pick all the frost skills, etc..

 

I fixed the ring equipping finally, now when you equip a ring, it will search for the first empty ring slot in your gear, and if both ring slots are occupied, then a message box will appear where you can choose which ring will be replaced.

3

 

I want to do drag-and-drop equipping gear too, and after that I’ll implement more skills.

I’m closing to an end with the core mechanics(cheers!) so I’ll start implementing a little tutorial for the new players,  do 3 dungeons and more skills.  I’m thinking of shipping a Beta version to the Google Play store for free and no ads, so people can find it, and after that I’ll start work on polishing the game, adding effects, etc..

 

Links to alpha version demo:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk

 

Warrior skills + a lot of bug fixes

I managed to make the combat skills work too, only the buffing skills worked before.

I implemented the skill rank system, as you level up, your skills improve. For now a skill gains a new rank every 5 level, for example: you get your first skill at lvl 2, and at lvl 7 you will gain rank 2 of that skill, at lvl 12 you will gain rank 3, etc… You’ll get the second skill at lvl 4, then rank 2 of that skill at lvl 9, rank 3 at lvl 14, etc…

Ranking system is not set in stone yet, needs more work, I need to test how balanced it is.

Added the warrior skills:

Shield Block: block 50% damage n next incoming damage, has 5 sec cooldown, learned at lvl 2 (may change this to block 50% of all incoming damage for 2-3 seconds)

Taunt: taunts every enemy to attack the warrior for 5 sec, has 10 sec cooldown, learned at lvl 4

Stun: stuns a group of  enemies for 3 seconds, has 15 sec cooldown, learned at lvl 10

– Disorienting Shout: disorients a group of enemies for 5 seconds, has 20 sec cooldown, learned at lvl 16

– Shield Wall: block 99% damage of the next incoming damage, has 30 sec cooldown, learned at lvl 28 (I may change this to block every incoming damage for 2-3 seconds, will see how it works)

Added a skill message box when you level up and get a new skill:

1

2

 

I fixed a lot of skill related bugs.

Improved the loot system: now you will get normal loot 95% chance, rare loot 4.89% chance, epic loot 0.109% chance and legendary loot 0.001% chance. Chance for epic loot was way to high before, I got 50-100 damage weapons at lvl 8-9 😛

When you start a new game you can choose any guild you want and this will be your starting guild(limited by alignment, evil characters can’t be paladins, etc.. I’m considering to add race limitations too, like giants can’t be thieves, they are too big :P). You can level up in that guild and if you join another guild, you can always join back to the starting guild, even if you don’t meet the stats requirements. But the stat requirements to join another guild in-game still applies. I may add some bonus to starting guilds later on.

Working on the skill management system now, you will be able to choose only 5 skills to use in dungeon, but you will be able to change this 5 skills whenever you get back to town.

 

Links:

Webplayer:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth/Dungeons_of_Orroth.html

 

Android:

https://dl.dropboxusercontent.com/u/195129959/Dungeons_of_Orroth_Android/Dungeons_of_Orroth.apk