Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

TowerDefense ToolKit 4

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

  1. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Thanks for pointing this out. But I'm afraid this is a bug with the Unity5.3.1 (please check this link). You can either revert back to any version before 5.3.0 or try the latest 5.3.1f, if it's already out.There's no much I can do about it.
     
  2. Proto-G

    Proto-G

    Joined:
    Nov 22, 2014
    Posts:
    108
    Hey Song, Is there a way to take the creep path and make the end follow an object @ runtime? Start of path is locked, rest of path is dynamic and follows certain object? Would be VERY cool if there is :)
     
  3. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Of course. It depends on the exact implementation. When one of the waypoint moves, does the creep just change its heading direction (towards the new position of the next waypoint)? Or will it adjust its position so it stay on the path? The former is relatively easy to do. I'll put it in the next update. The later tho is a lot more tricky.
     
  4. Proto-G

    Proto-G

    Joined:
    Nov 22, 2014
    Posts:
    108
    This is what I was thinking https://mknkt54321-gmail.tinytake.com/sf/NDQzMTg2XzI0MDExNDg If that makes sense o_O Is that similar to what you were thinking would be easy to implement? And I just wanted to point out that your asset and customer service are GREAT! Really appreciate seeing quality devs, creating quality products and offering quality service. Would love to see you join the VR revolution :cool:
     
    Last edited: Jan 8, 2016
  5. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Thanks for the compliment. :)

    Yes, what you are thinking is exactly the first scenario I described. So yea it's not that difficult to do. Let me know if you need it in advance. I don't think the next update is going to happen so soon. At least not in a week or two.
     
  6. Proto-G

    Proto-G

    Joined:
    Nov 22, 2014
    Posts:
    108
    Sure, would love to have it prior to next update, when you get around to implementing it!
     
  7. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Just a quick announcement that I'll be away for 2 weeks starting tomorrow. During that period I may or may not have internet access so I might be a bit slow in respond on any issue/post. Also since I won't be having access to my work station, some issue will have to wait until I'm back. My apologies for any inconvenience in advance.
     
  8. Hilme

    Hilme

    Joined:
    Feb 6, 2016
    Posts:
    1
    @songtan

    Hey Song, is there a way to make a resource that have a value of a PlayerPref and its not predefined in the game control,

    Thanks in advance for your kind support :)
     
  9. mahdijj

    mahdijj

    Joined:
    Sep 24, 2015
    Posts:
    31
    when is estimatly date for release of version 4?
     
  10. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    @Hilme, I'm not, unless you do some modifications of your own. You can add the load from PlayerPref code in gamecontrol or override the default value set in inspector.

    @mahdijj, There's no concrete plan for that yet. My guess, given my current amount of commitment, it's not going to happen anytime soon.
     
  11. mahdijj

    mahdijj

    Joined:
    Sep 24, 2015
    Posts:
    31
    hi
    i can't add animation to creeps in v3.1
    pls help
     
  12. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Very sorry for the slow respond. I'm now finally back to my normal work schedule.

    Fyi, you can't add animation using UnitEditor yet. You will have to manually add the script UnitAnimation to the creep prefab and then assign the animation clip using the inspector.
     
  13. mahdijj

    mahdijj

    Joined:
    Sep 24, 2015
    Posts:
    31
    can you provide new video tutorials for your asset?
     
  14. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    I have plan to make new video. However I'm still working on various update for the package. The video will have to wait until that's done.
     
  15. JunesiPhone

    JunesiPhone

    Joined:
    Feb 19, 2016
    Posts:
    5
    I have a few issues on mobile platforms. Looked through 20 pages before buying and seems like iOS and Android worked fine. Maybe i'm missing something.
    1. In FPS mode you cannot switch weapons or exit (reload not a big deal). If you enter FPS mode you are stuck forever.
    2. When panning the camera, tiles can be selected.
    3. Pans camera when moving the slider to adjust tower direction
    4. After you change a towers direction that popup menu doesn't close stopping you from seeing other menus.
    5. When selecting a tower (on mobile with touch on) you can select another tile. (screenshot below)
    6. Almost impossible to use Strike or Shockwave. (Although I did get it to work once)
    I could go through the list and fix each one, but having someone familiar with all the scripts to explain or post fixes would save me a lot of time and headache.

    Ideas
    FPS could be fixed by adding a button to that camera to trigger FPSControl.hide(), maybe an invisible box over the "selected weapon" to change weapons, detecting when camera is moving could stop tiles being selected, not sure about the slide, detect tile is selected to stop other selections while one is checked, use a tap to select then tap screen to trigger Strike, Shockwave, etc. All seem pretty simple to fix if you know the scripts.

    I just ran into the same kind of issues with the last Toolkit I purchased. Well theirs worked, just were disabled on mobile, yes I purchased 2 tonight, well now today. Looking at the kit I do like most of the options, and do plan to learn the scripts and kit, but to get a fully working "Hello World" is what i'm after. Any help would be appreciated. I'll check back here or we can email, dm, etc. Email: street.visions[at]yahoo.com Twitter: http://twitter.com/junesiphone



     
  16. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Thanks for your purchase and feedback.

    1. I believe I've stated somewhere that fps mode is not supported on mobile. The issue is that I haven't implemented a touch based control scheme for it.
    2. I'll try to fix that
    3. I'll try to fix that
    4. I don't quite understand this. You mean when changing the tower aim direction?
    5. It's a bug. I'll fixed that.
    6. Sounds like a bug too. I'll check again.​

    The thing is the current UI has just been added in the last update. And I'm still actively making change to the toolkit as part of a big restructuring. So there are still some rough edges. I'll take your feedback and make the appropriate changes and fix. Please let me know if you need them asap. I can't make any promise about things like adding the control scheme for fps mode (that could take some time), but I can try to fix the small issue asap and send you an advance update.

    Hope this answer your question. Thanks again for your feedback.
     
  17. JunesiPhone

    JunesiPhone

    Joined:
    Feb 19, 2016
    Posts:
    5
    I ran through 20 pages, didn't catch them all. You probably did mention it.

    MGTower > PulseLaserTower > BeamLaserTower

    I was mistaken, its the BeamLaserTower (3rd upgrade) where it gives you the option to change target direction. Menu gets stuck here. I can provide a video if you need?

    Thanks for your quick response. I'm actively working on this project now, as soon as you can would be great. I will look into the FPS mode.

    Here is the log. To duplicate, start wave add MGTower upgrade to 3rd tier.


    Makes sense as the range indicator changes, so more than likely it doesn't exist.
     
    Last edited: Feb 19, 2016
  18. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Thanks for the detail. I'll look into it and try to give you a fix asap. Please let me know if you run into more issue.
     
    JunesiPhone likes this.
  19. JunesiPhone

    JunesiPhone

    Joined:
    Feb 19, 2016
    Posts:
    5
    Couple more for you. Double upgrades, and sometimes very difficult to place tower (with TouchMode).

    Edit: With drag and drop method, moves camera.



    Just to note i've done nothing with the scripts.
     
    Last edited: Feb 20, 2016
  20. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    I can't replicate this on my device.

    Double upgrade is not a bug, it's a feature. You can have branching upgrade paths for towers. For instance, tower-A and be upgrade to tower-B or tower-C.

    Other than that, I think I've fixed the other issue that you mentioned. Please send me an email so I can send you the fix.
     
  21. JunesiPhone

    JunesiPhone

    Joined:
    Feb 19, 2016
    Posts:
    5
    That makes sense. Thanks.
     
  22. PolymorphicGames

    PolymorphicGames

    Joined:
    Oct 30, 2015
    Posts:
    2
    Hello Song,

    I just bought your TDTK today, and I'm very excited about it. Do you have a tutorial or any resources on how to add other body forms to the creeps? I'd like to replace the vehicular creeps with other assets that my students are creating. I see from your demo that you can do this, but I'm not sure how.
     
  23. PolymorphicGames

    PolymorphicGames

    Joined:
    Oct 30, 2015
    Posts:
    2
    ...and I figured it out! I misread the pdf - sorry! Once again, thank you for creating this amazing template!
     
  24. ionside

    ionside

    Joined:
    Apr 7, 2011
    Posts:
    43
    Hi songtan, I'm wondering if it's possible to set the creeps up as Nav agents and follow a nav path? Seems pretty fixed on following a path at the moment. Is there a clean way that I could remove the spline follow but still have the start and end points?

    My main goal is to not have them moving in a single line. I'm hoping to at least give them some random offset.

    Thanks,
    Rob
     
  25. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Yes, it's possible. However usng nav-agent is not supported by default. You will need to do some modification to the code. Anyway, based on my observation, even with nav-agent, the creep will still follow the exactly same line along the path. So you will probably end up with the same result.

    Perhaps you can try play with the value of 'dynamic offset' on the path component. That should give the path some variance for each individual creep. Basically it give each creep some varying offset from the supposed waypoint, making them looked as if they are not moving on the exact line as each other..
     
  26. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    I'm thinking about buying and so I tried out the demo at the link from the Asset Store page and quickly ran in to this issue.

    I tried adjusting the direction a tower pointed by using the slider and I noticed a couple different issues.

    1) The red fan shape for the direction was to the side of the tower. Wasn't sure if this was how it was suppose to be. Does this signify the direction it points or the spot it cannot attack?

    2) I couldn't close this menu, build any more towers, or do pretty much of anything after this point. The console popped up with errors and it could be closed but nothing else could be done within the game.
     
  27. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Thanks for the feedback. Both issue originated from the same bug. It's a bug that I've since fixed in my development build for the next update. Hopefully the next update will be ready in 2-3 weeks from now. But you can always have the fix in advance if you want to.

    To answer your question: yes, the red fan shape is the direction and the range of tower's attack.
     
  28. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Thank you for the prompt response.

    Can you tell me how elevation effects gameplay? I see some of the demo scenes have ramps and higher and lower elevations.

    Thank you!
     
  29. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Elevation doesn't really effect gameplay. Everything will be exactly the same. The ramps in the demo is just to show that you can build a 3D path instead of a strictly horizontal one. However you should take note that the attack range of each unit is calculated directly from the unit to the attack point. So the attack area within range is actually a 3D sphere rather than a vertical cylinder. In that sense, elevation does reduce the unit attack range horizontally.
     
  30. Udin89

    Udin89

    Joined:
    Jul 19, 2015
    Posts:
    15
    Hello, can I make 2d tower-defense game with this toolkit?

    Thanks before........
     
  31. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Yes you can. However depends on the camera angle you want to use, you may have to do a little modification.
     
  32. Udin89

    Udin89

    Joined:
    Jul 19, 2015
    Posts:
    15
    Thanks for your response. Can you elaborate it? What is the connection between 2D game and camera angle? Because I use 100% sprite for characters and environment
     
  33. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Well, Unity is after all a 3D game engine. 2D game in unity is just a 2D asset arranged in 3D environment in a specific manner, normally with the camera align to a specific axis. On top of that, TBTK is written with 3D asset in mind, so by default the unit will rotate around y-axis to face the target or move direction. Then there's the matter of the 2D sprite, the angle which they are view from specifically. Is it top down, isometric or side? If top down, then it should work just fine without any modification if you set the camera to top down. Otherwise, you might want to change the code to disable unit rotation. If your sprite is directional, you might even want to add more code to get the sprite to face the correct direction (by displaying the right sprite).
     
    Udin89 likes this.
  34. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Dear user of TDTK, I'm very please to announce that a new update is now live on AssetStore. I've add some really nice visual candy in this update. Check it out:





    However, please note that all the model in the prefab (both towers and creep) has been replaced with the new model so if you intend to use the default model in your project, I would strongly advise you to make a backup.
     
    puzzlekings likes this.
  35. Udin89

    Udin89

    Joined:
    Jul 19, 2015
    Posts:
    15
    Many thanks. Obviously, I will buy it
     
  36. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    393
    Looks really nice!
     
  37. Dom Kost

    Dom Kost

    Joined:
    Mar 6, 2016
    Posts:
    6
    Hey, Song

    Thanks a lot for the great toolkit! This is very helpful for my university project in the coding area.

    I have one query.

    Is there a simple way to replace the UI elements (All the different borders, fonts, colours, etc)? I assume you can just replace the prefabs for all the icons. But I'm not sure how to deal with the other elements in the menus.
    Sorry if this was already answered. Let me know...
     
  38. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    You certainly can. It's not difficult but it's going to be laborious. You will have to select each individual UI element in the hierarchy tab and change the relevant setting in Inspector. You can probably do multiple selection in some case but inspector setting is the only way to go.

    If you are not sure of what I'm talking about. I would suggest you to go through this video - https://unity3d.com/learn/tutorials/modules/beginner/ui/ui-image?playlist=17111
     
  39. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Hello!

    I'm looking for the documentation on creating a new tower and how to set it up.

    Is this documentation not available in the free version?

    I'm looking at messing around with that before purchasing the full version. I want to see if it will be suitable for my needs and my workflow.

    The new update looks good.

    Thank you.
     
  40. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    The free and full version have more or less the same documentation. The one in full version is slightly more up to date obviously. In term of the basic stuff like how to setup tower, they are exactly the same. I believe I have explain things sufficiently in section Tower(page7) and Units (tower/creep) That Fires At Target(page10). It's very simple really, in a nutshell you will need to:
    1. attached the relevant script to an empty object
    2. put the tower model into the prefab hierarchy (optional)
    3. assign the turret (the child object that is going to aim at target) as turretObject (optional)
    4. assign a shoot-point to indicate where the shoot object will be fired from (optional)
     
  41. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Where in the kit is the documentation located? I looked in the free version and couldn't find it.

    Thanks for the quick run down.

    Any online documentation?
     
  42. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    There's no online documentation.

    The documentation is there in the folder 'TDTK_Free', named TDTK_v3.0_Documentation. You might have deleted or moved it accidentally. I would recommend you to re-download the package and then do a search, using keyword 'Documentation'.

    Alternatively you can send me an email. I could send you a copy.
     
    maxaud likes this.
  43. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Thanks, I appreciate it.
     
  44. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    I see reading the documentation that nextLevelTower is essentially a branching upgrade path. Any way to make it so that it's a linear path, or both combined?

    Something like the following:

    1) Default Tower Prefab
    2) Level 2 Stats Increase
    3) Level 2 Tower Prefab + Stats Increase
    4) Level 3 Stats Increase
    5) Level 3 Tower Prefab + Stats Increase
    6) Branched Upgrade - Option A, B, or C.
     
  45. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Certainly. This is how it works. All towers will have an expendable list of stats and 2 nextLevelTowers. The minimum size of the stat list will always be one. That first element of stats will be used as the base stat. Both nextLevelTowers are optional. You can either assign both, one of them, or none at all. A tower can be upgraded if the stats list is more than 1 or any of the nextLevelTower is assigned.

    When upgrading, the tower will always upgrade to the next stats first. So it keeps its game-object but the stats is changed. If there's no more stats to to upgrade to, the tower will will then upgrade to nextLevelTower. Basically destroying the current game-object and create the next level tower to take its place. If only one nextLevelTower is assigned, then it's a linear upgrade. If both nextLevelTower is assigned, player will be given 2 upgrade button, each leading to different nextLevelTower upgrade.

    The only thing that can't be done by default in your example is option C since there's only a maximum of 2 different upgrade option. That said, I limit the number of nextLevelTower to two purely due to the restriction of the default UI. If you want to build the UI to support it, you can easily change the limit.
     
    maxaud likes this.
  46. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Thanks for the responses. Purchased today. Look forward to messing around with it and I'm sure I'll have a few more questions.
     
  47. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    Thanks a bunch! Hope you enjoy your purchase.
     
  48. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Is there an easy way to make the creeps attack objectives?

    Rather than have them simply get to the base they would move from objective to objective doing an attack animation until the health of the objective would reach zero.
     
  49. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,638
    The easiest way would be to modify the attack target of offense creep. By default they attack towers. What you can do is change it to attack those objectives. Fyi the creep detects its target by layer. So you just need to create a new layer and assign the objectives with that particular layer and of course, change the code for target detection in Unit.cs. Once done, you can place those objectives along the path. Then the creep would stop at key point to attack the objective. Make sense?
     
    maxaud likes this.
  50. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    163
    Yes, I'll dig in to it. Thank you.
     
unityunity