My AssetStore Link

I've moved - GO TO THE NEW WEBSITE

Unity Store Link - Click to see all the Song's work that has been put on Unity AssetStore




Thursday 7 February 2013

Perk System in detail

So I say I'll do a break down of the perk system and here it's.


Start with individual perk item. Each item can be assigned a name, icons (included unavailable, available and purchased) and description which will be used for in game UI. Then there's a type, which define what this particular item is for. That means unfortunately the purpose of any item is still needed to be pre-defined and partially hard coded, so there can be a finite number of type available. Currently there are 34 perk type available, some are quite similar to each other. Basically it can be categrorized into 4 major group, they are:
  • Life related
  • Resource related
  • All Tower stats or cost modifier
  • Specific tower stats or cost modifier
Full list of the perk type available is listed at the bottom of this post

Naturally for each item, you can specify the cost required to unlock. Then comes the requirement for each item. There are 3 of these:
  • wave count requirement - player need to survive at least how many wave before the item become available
  • perk point requirement - how many item player need to purchase and unlock before the item become available. Note that purchase an item gives player 1 perk point
  • pre-req perk -  what are the perk/item needed to be unlocked before the item become available. You can have as many of this. Even a perk that require unlocking every other item in the list!
Finally there some type dependent variable(s) that is tied to the functionality of the perk type itself. For instance, 'UnlockNewTower' would require selection of a towers assigned to TowerManager, 'SpecifedTowerStun' would require two numerical value, success percentage and stun duration, instant resource bonus would require an integer array the length of total resource count. Some of these value can be set to be interpreted as percentage range from 0 to 1.


So basically you can create a list of item. Each item would act as a tech upgrade, a perk or indeed an in game shop item. PerkManager in each level can be be used to enable/disable any item in the list as well as unlocked them prior to the game start.

Example UI for both unity default UI and NGUI implementation has also been added as a compliment element to the perk system. I wont say the sample UI is very flexible for customisation but it does have some option. And I'm still looking for ways to allow the item list of the perk window to be customises with greater flexibility.

Finally here's what I secretly plan to do next. Add in active player abilities, like AOE damage effect, boost tower speed for a fixed duration. Probably a energy system to go with it. Like using each ability cost energy which will then recharge overtime . Then I'm probably gonna add a lot more perk to complement the ability system. Wouldn't that be awesome?!

Anyway, I think I covered pretty much there is to the perk system. As promised, the full list of the perk type available:

TowerUnlockNew,
TowerBuildLevelBonus,
TowerBuffHP, 
TowerBuffAttack, 
TowerBuffDef, TowerCritical, 
TowerCriticalChance, 
TowerCriticalDamage,
AllCostReduction
BuildCostReduction, 
UpgradeCostReduction,
LifeIncreaseCap,
LifeBonus,
LifeBonusWaveClearedLifeRegen,
ResourceBonus,
ResourceGeneration,
ResourceGain,
ResourceGainCreepKilled,
ResourceGainWaveCleared,
ResourceGainResourceTower,
SpecifiedTowerLevelBonus,        
SpecifiedTowerBuffHP,       
SpecifiedTowerBuffAttack,
SpecifiedTowerBuffDef,
SpecifiedTowerBuffRange,
SpecifiedTowerCritical,
SpecifiedTowerCriticalChance,
SpecifiedTowerCriticalDamage,
SpecifiedTowerAllCostReduction,
SpecifiedTowerBuildCostReduction,
SpecifiedTowerUpgradeCostReduction,
SpecifiedTowerStun,
SpecifiedTowerSlow

9 comments:

  1. Hey Song,

    I was wondering if these perks are saved between sessions? I'd very much like to buy this extension, but I'm not certain how much work it would be to implement PlayerPrefs calls for every upgrade I wish to create. Thanks for all your hard work!

    ReplyDelete
    Replies
    1. If you are referring to each play session, no they are not saved yet. Due to the nature of the toolkit, it's all down to the user to decide if they should be saved or how they need to be saved.

      But it not too difficult to add a simple PlayerPrefs based save system. I'm very happy to add the necessary function call to do that. I'll add that in the coming update.

      Delete
    2. Awesome, thank you! One more thing, if I buy the Toolkit now, will I be able to get this potential update? Or, maybe more appropriately: How long do we receive updates after buying the toolkit?

      Delete
    3. If you get it via Unity AssetStore, you are entitled to all future update. It's the same if you get it directly from me. The difference is you can download it anytime you want from AssetStore, but you may have to mail me to get a download link from me. Please note that unlike AssetStore, I wont be able to keep a 24hour link all year round.

      As for update, I work on it from time to time and release it as soon as I can. And it depends on how much stuff I'm actively working on and how busy I'm with other project. On average, there has been an update at least every 2-3 months.

      Delete
  2. Thanks Song, I just bought the full version! I have found a bug, though. Not sure where to submit it, but in "ExampleMazeMultiPath&Platform" (or any map with a "DragNDrop" build mode) I'm unable to build towers if I've opened and closed the Perk Menu. I can still build using the other build modes, but since they cut stuff off at the top of the screen, I think it's kind of important to have the DragNDrop support. Any ideas where to look in order to fix this? Is this the correct place to submit bugs? Thanks again!

    ReplyDelete
    Replies
    1. Thanks for your purchase!

      I noted the bug. I'll work on it. Can you please send me your email so I can pass you the fix as soon as it's done.

      If you come across any more bug, you can always email me directly about it. Or make a post at the official support forum, you should be able to find the link at the top panel of your unity editor.

      Delete
  3. Hi Song,

    We would like to build a TD game like this game: https://itunes.apple.com/vn/app/canimals-td/id470109090?mt=8

    I find out that your TDTK might good for us to build the game but I still have two questions, please confirm me:
    1. Can we build game like that game above with custom tower, custom spawn, custom maps?
    2. Can we export the game to Android devices (Samsung Galaxy S2 & later, Ringerbread & later)?

    I'm waiting for your feedback.

    Thanks,
    Toan.

    ReplyDelete
    Replies
    1. Please contact me at: toan.nguyenmanh@gmail.com

      Delete
    2. I would suggest you to check out these videos (http://song-gamedev.blogspot.co.uk/2013/02/tdtk-quickstart-videos.html). They should give you a fairly good idea of what's TDTK and what it can do. You might also want to give TDTK free a try so you can get a taste of it. You can get it at https://publisher.assetstore.unity3d.com/free-downloads.html. But please note that TDTK free is very limited in term of features and support compared to TDTK full.

      To answer your question:
      1. I'm not familiar with the game you show me. There are very limited information about the game that I can find. So I cant really say if TDTK can imitate it 100%. But yes you can definitely have custom tower, creeps, spawn pattern and maps.

      2. I have test it personally on Android devices so I cant vouch for it. But it uses only Unity default feature without any 3rd party plugin so as long as Unity supports the device/system you plan to use, it should be good.

      Hope this answer all your questions.

      I've also respond to you via email.

      Delete