Search Unity

TowerDefense ToolKit 4

Discussion in 'Assets and Asset Store' started by Song_Tan, Apr 18, 2012.

  1. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    An interesting idea for sure. It's not the first time it has been suggested to me. It's not my highest priority at the moment. But I'll see what I can do. Just dont hold your breath yet. :)
     
  2. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm pleased to annouce that the long awaited NGUI based UI is now available with the release of v2.1.1. The new update is now live on AssetStore. Please check out the updated demo to see the new UI in action. Following is a quick list of new addition/changes/fixes, please check out the development blog to find out more.

    addition
    • added nGUI based ui, with fully commented code.
    • optimization of DrapNDrop Build mode. DragNDrop tower is now subject to dynamic batching.
    • added option to disable the transparent shader to sample tower in build preview.
    • tower animation has been reworked. Add option to assign animation for upgraded turret and base object.

    bug fixes
    • fix bug where DirectionalCone and StraightLine targeting direction is not set properly when changed during runtime.
    • fix bug on all ui where resource tower income were not displayed correctly.
    • UIiOS will now show information about mine.
    • UIiOS will now show information about DirectionalAOETower.
    • when building on a rotated platform, the tower rotation will match the platform's.
    • mine built with PointNBuild mode will no longer block a node.
    • DragNDrop tower's renderer material's shader will not be set back to the default shader set in prefab instead of diffuse.
    • and other minor bugs.

    Feel free to ask any question you may have. Your comments and feedbacks are most welcome! :)
     
  3. RobertWiggin

    RobertWiggin

    Joined:
    Nov 26, 2009
    Posts:
    8
    Hello Song, First of all , thanks for working on the implementation of NGUI.
    I have a problem when I try to import my NGUI (Bought on the Store) to my Project, I'm deleting the NGUI folder under TDTK but i can't because it says that there is a problem
    and a couple more like that..

    What i need to keep at the NGUI folder of TDTK?

    Thanks.
     
  4. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm not sure why's that. you should have no problem deleting anything. Here's the steps I've tested and work just now. Please follow them and let me know how it goes.

    1. Import TDTK
    2. Move NGUI folder outside TDTK folder so later when you import the full version, all the files merge into one folder. (optional)
    3. Delete everything within NGUI folder except examples, specifically Atlas folder within examples folder.
    4. Import NGUI full version, make sure you dont overwrite the atlas. You can do so by uncheck the all the related files in the import list.​

    You may have errors showing on you log during the deleting/reimporting process. But it shouldnt be a bother after you completed step4.

    I apologize that I have made a mistake using the default example sci-fi atlas for the example scene in TDTK. Overwriting it when import your NGUI full version will not give you any error. But you might find that the TDTK related texture (tower icons and what not) will be gone and you will need to reconfigure the atlas. And I apologize again for not having these instruction included with the update.
     
  5. RobertWiggin

    RobertWiggin

    Joined:
    Nov 26, 2009
    Posts:
    8
    Woah, thanks for this fast support! :)

    I works like a charm Thanks a lot Songtan! :)
     
  6. deis

    deis

    Joined:
    Sep 17, 2009
    Posts:
    29
    Awesome kit, I am loving it!
     
    Last edited: Aug 11, 2012
  7. techwraith

    techwraith

    Joined:
    Jul 29, 2012
    Posts:
    2
    First off, the toolkit is amazing! We've been able to do some really cool stuff with it.

    Have you thought about adding in friendly units? I'd love to be able to have a "barracks" type tower that would allow a player to click it to deploy melee or ranged units within a certain radius. Then, if an enemy unit gets within range of a friendly unit, the friendly unit would attack.

    I know this is a little out of scope of the toolkit, but thought it would be a nice addition. If you don't want to implement it, I'd love to talk with you about how I could do this myself.
     
  8. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for your compliment.

    Yours is a very neat idea that's for sure. I want to do it but unfortunately it's very tricky to make it open to customization like other towers in the toolkit. I dont see how I can easily fit that into the existing framework. So it out for the time being I'm afraid.

    Feel free to contact me directly on my email. I might be able to guide you to do so.
     
  9. NexrageStudios

    NexrageStudios

    Joined:
    Aug 17, 2012
    Posts:
    4
    Hello Songtan,

    It seems like I'm only able to do a point and click build of towers on iOS, can i do a drag and drop instead on mobile devices? If so, could you point me in to the right direction

    Thanks
     
    Last edited: Aug 17, 2012
  10. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Unfortunately drag and drop is currently not supported on iOS. I could give you direction how it can be done but it will require some extent of modification to the framework. You will certainly need to do some digging into the code. I've sent an email to you. please check it out.
     
  11. techwraith

    techwraith

    Joined:
    Jul 29, 2012
    Posts:
    2
    Thanks Songtan,

    I'll definitely be contacting you when we get that point with our game. As a side note, have you thought about putting up a community wiki or something somewhere where people can read how other people implemented some of these features that you're having private conversations and emails about? It would be nice to have these things out in the open so people can learn from each other.
     
  12. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    That's probably something I will consider in the future when the user base of this framework reached a substantial level. At this point I dont think it's worth the effort. Thanks for the suggestion anyway.
     
  13. John-Sandrey

    John-Sandrey

    Joined:
    Jul 2, 2012
    Posts:
    119
    Just a Quick question, I just purchased the tool kit and i like it. But don't know if its me but all i did is up the waves to 20 on the second demo, and for sone reason the creeps get stuck around the 10th and 12th wave where they spawn.
     
  14. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for letting me know John, I think it's very likely to be a bug. I'll look into it and get it fix asap if that's the case. Sorry about that. Anyway, is there any error message shows up in the log?
     
  15. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I've found out what are the issue. To fix it, please add this line, stunned=false; to Unit.cs, Init(), somewhere in line 323. Terribly sorry for the problem. As usual, this will be fixed in the subsequent update.
     
  16. gn1024

    gn1024

    Joined:
    Aug 23, 2012
    Posts:
    2
    Hello songtan,
    Great work!
    We are going to purchase TDTK, but I can't figure out how many licenses should we buy. If we work on one project in one office, do we need to buy single license or it should be purchased for each developer machine? What steps should be performed to reactivate the license after operating system re-installation?
    Thank you.
     
  17. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for the interest!

    If you are working on a single project, I suppose 1 license will suffice. The way the AssetStore work is, you buy an asset/package with a set user ID. That user ID can then re-download the same purchased content for however many times he/she wants and he/she is entitled to any future update of the content. The package itself has no activation or registration or files ID tracking of any sort, so you can export and transfer the package from your unity editor just like any asset you created yourself. So you can either make one purchase with every single unity license you have on the team, or just get one copy and distribute it among your team. Of course strictly speaking, the latter is not exactly the right way, but it's certainly an option.

    As for step to reactivate the license after os re-installation. Simplay log in to AssetStore with the ID used to purchased the package and re-import it. Alternativaly you can just reimport from an ealier backup package if you have made one.

    Hopefully this give you enough info. :)
     
    Last edited: Aug 23, 2012
  18. gn1024

    gn1024

    Joined:
    Aug 23, 2012
    Posts:
    2
    Thank you very much for prompt reply.
    Tomorrow we will purchase 3 licenses, by the number of developers in our team. Thanks again :)
     
  19. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thank you very much in advance. :)

    Please keep an eye on this thread for any future update. There will be one coming soon for bug fixes, mostly for NGUI ui. Also please dont hesitate to contact me if you have any problem with the toolkit.
     
  20. smartmedia

    smartmedia

    Joined:
    Aug 28, 2012
    Posts:
    1
    Hello,
    Is there any possibility to create a platform/grid which is stretched on a terrain?
    In other words, what should be done to place towers on a terrain with mountains?
    Thank you!
     
  21. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    It's perfectly fine to put place the platform on top of a terrain (unity's or custom made). You can even put all sort of environment objects such as stones, trees, crates, buildings to your level. As long as those visual props has no collider on them, they will have no bearing on the game.

    For example, please see this demo. it's the same level with the default demo, I just placed a terrain into the scene. It's crudely done, took me only minutes. But I hope you can understand the point. Just one thing, you cant place the platform on a tilted angle. You can place it on on a slope, but the platform have got to stand upright.

    Hope that answer your question. :)
     
    Last edited: Aug 28, 2012
  22. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm please to announce that version 2.1.2 has jsut been uploaded to AssetStore. It's not live yet but it should be soon. :)

    Here's the list of change/update in a nutshell:


    addition
    • added support for configurable damage type and configurable armor type with for both towers and creeps. User can define multiple armor/damage type. The effectiveness of each damage type against each armor type can be configured.

    bug fix
    • NGUI based UI will now sow game-over menu when the game is over
    • pause menu will no longer interfere with game-over menu
    • upgrade to NGUI full version will no longer mess up the NGUI UI
    • fixed bug where creep would sometime stuck at the spawn point
    • fixed bug where creeps HP overlays are not positioned correctly
    • fixed bug where restart/next button on NGUI ui will not work properly
    • fixed bug where tower targeting direction will reset to +ve x-axis every time the tower is selected
    • when using PoingNBuild mode in NGUI ui, switching platform with different buildable tower type will no longer cause certain build button to move to incorrect position.

    known issue
    • upgrade to NGUI full version will cause a missing script error for Popup List's BaseSliceSprite. This can be fixed by assigning UISliceSprite.cs to the missing component slots.


    Please refer to the development blog if you need more information. Thanks for reading.
     
    Last edited: Sep 1, 2012
  23. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
    You sell you game on Steam GreenLight ?
    :)
     
  24. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Oh no no, I dont. not yet anyway.

    I wish I do though. :)
     
  25. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
  26. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Interesting... Thanks for letting me know.

    It's not me, but it's the exact thing from my demo that's for sure. I shall follow this with intrigue. :)
     
  27. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Man that's exactly TDTK even without a simple modifications, sorry to say but this is a cheep way to publish a game, personally I'm planning to use TDTK to publish my game but with my own assets and modifications.
     
  28. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    TDTK v2.1.2 is now live on AssetStore. Get your update and fix folks! Please do let me know if you come across any bug, or issue regarding the toolkit. Any suggestion or feedback are welcome!

    Regarding the game on Steam Green Light, it's a shame really if anyone is doing so with ill intent. But I from reading the description I think the developer intended to add some unique features of his own. If so, It's just a bad move that he uses the demo as it's prior to any modification and without any reference to the TDTK. But if unity can allow any user to publish angrybot demo as their own work, I guess I shouldnt be complaining. Those demo are the part of what user paid for anyway so they are entitled to use it anyway they want.

    To be honest, I'm very curious to see how that project will turn out. Either in seeing how far the demo can make as it's or how someone else is going to expand the game. Eitherway, it will be very interesting.
     
  29. morobuse

    morobuse

    Joined:
    Sep 4, 2012
    Posts:
    11
    hi...

    bought your toolkit and it rocks :)

    anyway... i am trying to hook up animation to the reource tower and cant seem to make it work...
    also, can u point me in the direction of allowing cycles on the resource tower... what I want to do is just have a build animation and a pump animation (it's an oil pump resource tower)...

    thanks
     
  30. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for your purchase and words of compliment. :)

    Getting build and fire animation to run on resource tower should be as straight forward as assigning the appropriate animation and animation component in TowerEditor. That is unless you have break your animation hierarchy somehow or there is a bug.

    Can you send me more detail regarding how you setup the tower and how you assign the animation in the tower editor. If you dont mind, you can send me a sample of your model and animation, I could set up the prefab for you.
     
  31. leaveleaflch

    leaveleaflch

    Joined:
    Jul 3, 2012
    Posts:
    3
    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[UnityEngine.Vector3].get_Item (Int32 index)
    PathIndicator+<EmitRoutine>c__Iterator14.MoveNext () (at Assets/TDTK/Scripts/C#/PathIndicator.cs:52)


    I change path smoothing to none and build tower will get error like this, any solution ?
     
  32. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi leaveleaflch,

    the PathIndicator.cs is a script that usually attached to a path gameobject, along with it there must be a PathTD script attached, inside the Path TD there should be an array of WayPoints, please check if the waypoints are defined and there is no missing items there?

    Hope that help.
     
  33. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @thanks bravery.

    @leaveleaflch, Are you using PointNBuild mode? I did a quick check and I think it's a bug. Please bear with me, I'll try to get to the bottom of it and let you know.
     
  34. leaveleaflch

    leaveleaflch

    Joined:
    Jul 3, 2012
    Posts:
    3
    ya,I am using point and build mode
     
  35. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I've just come up with a fix. Please send me an email so I can send you the files.
     
  36. leaveleaflch

    leaveleaflch

    Joined:
    Jul 3, 2012
    Posts:
    3
  37. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    40
    Is there a way to get image effects (Unity Pro) working, every time I apply an effect say DOF to Main Camera it creates another camera and the effect is cancelled out unless I disable that camera that gets created when the game runs.

    If I apply it to Camera(Where the Camera Control script is) then it does the same and uses the script created camera which just gets positioned incorrectly, I tried to fix this by placing the Camera Control script within the Main Camera but then zooming with mouse wheel breaks...
     
  38. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I assume you mean the overlay camera created in runtime specifically for the units' overlay?

    I have to apologize in advance for the fact that I'm not very familiar with how image effects work on multiple camera. I dont have Unity-Pro myself. What I can do is to disable the code so that no camera is created in runtime. But then the overlay camera will have to be set up manually in editor. Perhaps then you can work from there and set things up correctly without any alteration in runtime. Would that be alright?

    Please let me know and send me an email so I can mail you the modified files.
     
  39. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    40
    Here's and image, as you can see the effect only works if I untick the Camera in OverlayCamera



    If it used the main Camera it would work or maybe if camera control effected overlay camera as well as the main camera maybe, I'm not sure whats going on myself.

    E-Mail : Gun_502@hotmail.co.uk
     
    Last edited: Sep 6, 2012
  40. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Sorry for the delay. I've been trying to find a solution. Please check your mail.
     
  41. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    Hello Songtan,

    Loving the toolkit so far, everything has been rolling smoothly with our project. Especially since the new nGUI examples (awesome work, perfect timing for us).

    Anyways, for our project, we are using the tower defense gameplay as basically the battle system for our missions. Think a final fantasy style exploration mission and then each battle is a mini-tower defense segment.

    I have this main loop functioning no problem, however the tower defense kit as currently designed does not 'clean itself' after the game / wave is over.

    Basically what I need / want to be able to do is once the tower defense game is 'over', instead of loading a new level, return to the main level and continue the mission. However, the current implementation leaves a ton of objects behind, towers that were spawned fx objects etc...

    Ideally what I'd like to get it to do is spawn everything TDTK-related under a parent game object that I can delete after the tower defense gameplay is finished. However tracking through all of the code to figure out the random places that objects get spawned has been problematic.

    I imagine for 99% of your users, this isn't a problem as they will just load a new level and unity will do it's standard garbage collection. however this is a fairly big problem for me. Any ideas?

    Thanx in advance,
    Mike W
     
  42. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    actually i think i have this figured out. basically searched for anywhere that 'instantiate' was called and added a 'transform.parent = myTowerParent game object call. then i can simply destroy this parent once the battle finishes.

    wasn't nearly as messy or difficult as i expected.

    on to the next task ;}
     
  43. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I was going to say that but you beat me to it. :)

    Fyi, I only use 'instantiate' when building towers. So that's just BuildingManager.cs you have to dealt with. The rest of the objects spawned in game are pre-spawned and managed by ObjectPoolManager. So you can clear all the object managed by the manager by simply calling

    Code (csharp):
    1. ObjectPoolManager.ClearAll();
    Of course this still havent take into account of the base object such as GameControl, SpawnManager, etc... But I figure you could easily dealth with those. If you have any problem with any object that got 'left behind', let me know what are they and I'll let you know which code section it get 'instantiated' from.
     
  44. nickmartin

    nickmartin

    Joined:
    Mar 20, 2006
    Posts:
    8
    Wow this looks super cool and possibly exactly what I'm looking to get. I'm currently going through all your videos, but for some reason, your main demo keeps asking me to install the unity plugin (allthough I have it installed already). This is probably something weird on my mac, but just wanted to put it out there just in case there is anything wrong with your player version.

    This is the link:
    https://dl.dropbox.com/u/23073684/TD_ToolKit/Demo/TDTK_v2.1_Demo/WebPlayer.html

    Thanks for this toolkit which I will be buying later today :)
     
  45. nickmartin

    nickmartin

    Joined:
    Mar 20, 2006
    Posts:
    8
    Hey Song, I just purchased and it looks super cool so far!

    One thing, I tried to follow your instructions for importing full version of NGUI that you posted earlier:

    But then I get the following warning when playing the NGUI example scenes:

    The referenced script on this Behaviour is missing!
    UnityEngine.Object:Instantiate(Object)
    UInGUI:InitBuildButton() (at Assets/TDTK/Scripts/C#/UInGUI.cs:139)
    UInGUI:Start() (at Assets/TDTK/Scripts/C#/UInGUI.cs:121)

    When I imported NGUI full, I unticked everything that was in the /atlases folder.
     
  46. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Hi Nick,

    Thanks for your purchase. :)

    For the error, I believe that has nothing to do with the NGUI itself. In fact I just did a quick test on that. Did you delete something in the scene or change the assingment of the various reference of the UInGUI component in the scene accidentally? Specifically, Is your build button still there in the scene and assigned to UInGUI component?

    At any rate, in the latest version, you no longer need to do the steps I mention in order to get NGUI full version to work. You can simply delete the NGUI-free folder in TDTK and import everything of the full version. Please check with the download link I just sent to your email.

    Song
     
  47. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    40
    Hi there, I changed all the GUI icons but they don't change for the PC version and is there any way to do this?
     
  48. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Sorry but I dont understand. What GUI icons have you changed? The resource icon or the tower icon? And what GUI are you using, the default OnGUI() or GameObject based UI or NGUI?
     
  49. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    40
    I've changed the resource and tower icons and that worked fine, But when I changed all the menu icons and the icons such as Sell, Pause, Next level it doesn't take effect when I run the game but I can see the changes in game view.

    I also cant find where to change the gui where the tower icons are located from the default unity GUI as well as the small bars on the top and bottom of the screen.
     
  50. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I see. I think you are having some misunderstanding about the UI. There are 3 different type of UI used in TDTK.

    The first being the one you are seeing and not being able to change anything about it. This one is entirely scripted using Unity's OnGUI(). Then there's NGUI, which is obviously seen in the example scene with NGUI naming prefix. Finally that's the gameObject based UI, which is the one visible when the game is not running (the one you are trying to use).

    To use the UI as you the way you have modified it, assuming you are using the template UI gameObject from the exacmple scene, you will find there are two script component attached on the gameObject. One's UI and the other UIiOS. To switch between them, simple disable and enable the other. You can try both out and see which one is you want.

    quick note: you can change the appearnce of the scripted GUI by using an alternate GUI skin.