Search Unity

TurnBased-Toolkit (TBTK)

Discussion in 'Assets and Asset Store' started by Song_Tan, Aug 11, 2013.

  1. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    Hi again songtan,

    i wanted to inform you. i upgraded unity to 5.6 and i tried tbtk. game ui is not responding. i cant click ui buttons and battle arena. its probably position related problem. Also your dropbox pages are not working. new devs who might wanna buy the kit are not able to play demo right now.
     
  2. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for pointing them out, I'm aware of the both issue. The new change in 5.6 UI system has cause the TBTK UI to stop working. I'm working on a fix and will upload a fix shortly.

    As for the demo link, dropbox has drop support for running html file directly from the storage, which is a pain. I'm trying to figure out an alternate solution.

    On that note, until the demo link is fixed, anyone who like to try the demo can ask for a pc build from me.
     
    ponasoft likes this.
  3. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hi Songtan,

    I was wondering if you know of a way to have unito move more smoothly to their final destination. Rather than zigzaging on a hex grid by moving to the middle of each tile in their path, they could just move straight to their target tile but go around any obstacles in the way? Is that something Navmesh might be suited for?
     
  4. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Navmesh might be the way to go but you will need to prebaked it. That means you can't really generate the grid on the fly. Unless you set the obstacle as navmesh-obstacle. It should work fine for the obstacle that occupy the whole tile but it probably wouldn't work for a wall since there's no way to set the shape of a nav-mesh obstacle (they only comes in circle). So you can imagine a circular obstacle that could cover the width of a wall could also partially block both the obstacle tile. Also the last time I check, the obstacle only stop the agent from moving through. It doesn't really remove the area occupy from the base path-finding. A section entirely walled off by nevmesh obstacle could still be considered as a valid path by the agent. So that agent will attempt to follow the path only to get stuck on the obstacle.

    In short, it's possible. But most probably it only work if you don't generate the grid in runtime. Another alternative is to write your own algorithm that smooth the path.
     
  5. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Cool ... thanks for the info. Would modifying the algorithm be something I could get you to develop for me as a bit of contract work? I'd love to be able to add that enhancement without having to bake navigation meshes on all the levels for both my games.
     
  6. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I could try. But honestly I don't really have a guarantee solution readily available. This may take some trial and error to get right. Do send me a email. We can discuss about the details.
     
  7. bullardo

    bullardo

    Joined:
    Jan 5, 2013
    Posts:
    46
    This info may be nested in the forums someplace but I was unable to locate it.

    * Is it possible to generate the tile oriented on a fixed point (gameobject)?
    * is there a class to instantiate enemy, players, etc on a tile or a general rule of thumb on how to do so?

    I probably have some more questions once I dive in this weekend but those are the ones on the top of my head.
     
  8. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Not really. But all the grid is nested under a parent transform (look for 'SquareGrid' or 'HexGrid' in the scane). You can move that transform to the fixed point you want after the grid is generated.

    Just select GridManager in the scene, the Inspector has everything you need to edit the grid,. That include placing units on the tile.

    Hope this help.
     
  9. bullardo

    bullardo

    Joined:
    Jan 5, 2013
    Posts:
    46
    What if I wanted to do this via a helper script instead?

    I am more interested in generating the grid and all the entities at runtime.
     
  10. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    There are various static method that you can call in GridManager class itself. However depend on what exactly that you want to do. Some operation are not exactly safe to call during mid game in runtime. But you can definitely instantiate new unit and place them on the grid during runtime.
     
  11. bullardo

    bullardo

    Joined:
    Jan 5, 2013
    Posts:
    46
    Excellent, thanks. Looking forward to working on it this weekend.

     
  12. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    i updated to 2.1.1 f5 this tuesday game arena is fixed but i have still ui issues in demo campaign menu. will uı fix come later or only i have the problem?
     
  13. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    You mean the perk menu? Yes, that's something I overlooked. A fix is coming soon. But if you want, you can just remove line43 and line44 of UIPerkMenu.cs. That should fix the issue.
     
  14. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    i am away from home right now and i cant check right now but as soon as i remember unit select screen was also empty in demo campaign menu.scene. i imported package into new project. there was no unit to select at all.
     
  15. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    There's no unit to select? Or there's nothing on the screen? Either way, I've just checked on my end. Import TBTK2.1.1f5 to an empty Unity5.6 project. The scene works fine except I can't interact with the perk menu, which I fixed by removing the two line of code I mentioned.
     
  16. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42


    Avaible units are not showing. They go away after 0.1 sec you start the screen. buttons in the bottom are not working. i created empty project using unity 5.6 and TBTK2.1.1f5.
     
  17. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Right. I suspect there's some setting error in your scene that some how cause one of the dimension of the rect-transform to some NaN value. I managed to replicate that by manually manipulating the value of the content-rect in the available unit scroll-view. However I 'm not sure how that happen in your case. Can you export your scene as it's. I'll check if the same problem happen on my end. and if yes, I can probably figure out what's wrong.
     
  18. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    is that a problem only i face or is it common? i did not edited anything just deleted appdata and downloaded again in assetstore.

    i found somweething when i click missing objects i got this error:
    http://i.imgur.com/W1mr9fo.png

    Here is my package: https://we.tl/3I173QklHY

    Lastly thanks for the quick reply.
     
  19. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Here's the funny thing. Your scene actually works on my end. So I'm not really sure what's wrong here. I can only be sure that the source of the problem comes from the ContentSizeFitter on the ContentRect object in available unit scroll-view (the parent object of the object you selected in the image you showed me). Try disable it. If my guess is correct, everything should be working fine as long as your available unit doesn't exceed 15. If it does, let me now. I can modify the script so that content-rect size is adjusted by other mean.
     
  20. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
  21. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Interesting that the same bug doesn't happen on my end. Anyway, thanks for the info!
     
  22. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    i tried to animate my models correctly but i couldn't do it. i searched in this topic and i found this:
    https://forum.unity3d.com/threads/turnbased-toolkit-tbtk.195426/page-33#post-2798974

    Dropbox link is down. can you share it again please?

    i use simple fantasy character assets and they have their own animations. i added unit and animator compenents. it did not work. than i also added unitanimation script and choosed right clips again did not worked. by the way i am not sure should we add both animator and unitanimaton script. lastly clips are named different than sample animation on tbtk but i checked unitanimation.cs and saw you override clips so clip name is not important am i right?
     
  23. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
  24. ATFSR

    ATFSR

    Joined:
    Apr 12, 2017
    Posts:
    1
    Hi Songtan,

    Is there a current link available for TBTK documentation? I found a Dropbox link in a comment on your site, but it's 404'd (and appears to be for an old version anyway).
     
  25. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
  26. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Kybernesis likes this.
  27. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Cool. I'll check it out when I've time. :)
     
  28. michalides

    michalides

    Joined:
    Jan 9, 2017
    Posts:
    15
    Hi ,
    I have the same issue with UI (unclickable).Unity v. 5.6
     
  29. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Are you using the latest version of TBTK? The UI issue should have been fixed with that.
     
  30. michalides

    michalides

    Joined:
    Jan 9, 2017
    Posts:
    15
    Actually i have version 2.1.1 f3, in my download manager i have 2.1.1 f5 but when i import it, it is still 2.1.1 f3 :( Can you tell me why?I try reimport etc. but still 2.1.1 f3.Thanks

    Unity v. 5.6.0. f3
     
    Last edited: Apr 22, 2017
  31. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    How do you tell that that the version in your project is 2.1.1f3? Have you try import to a new empty project?
     
  32. michalides

    michalides

    Joined:
    Jan 9, 2017
    Posts:
    15
    Yes, i try that but still 2.1.1f3 .
     
  33. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm not sure why tbh. I'm going to say that it's probably some bug with the asset-store importer? I have to say though I actually forgot to update the version display in the support window so that it's still showing as 2.1.1f3. You have to check the documentation to be sure. Anyway, have you actually try run the scene after you update?

    If this doesn't get fixed, I can send you the script directly. Please send me an email with your invoice number.
     
  34. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
  35. FlloriiN91

    FlloriiN91

    Joined:
    Feb 26, 2015
    Posts:
    6
    Hello,
    Firstly, i really want to buy the TBTK :)
    So for that i really need some info, if anyone can answer me:
    - Are the problems with the new Unity 5.6 fixed (UI, etc.)? is it working ok now?
    - Are there major issues on it? if someone knows can they give me some examples of bugs?
    - Does the cover system work well? (i want to make an xcom like game so the cover system will be a main gameplay pillar)
    - It is optimized for Android? IOS?

    Hope to get the info soon
    Thank you.
     
  36. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    I am in need of a turn-based solution and this one looks good, is being supported, and has good reviews. But I have a few questions first that I couldn't really find by the search function.

    1) Will this asset work on non-flat terrains, it seems at one time it was only for flat?

    2) Is it possible to add/edit/delete unit statistics? With or without coding?

    3) Is the asset c# code commented well for easy understanding?

    4) Is their a recommended fog of war asset that works well with this?

    Thanks
     
  37. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    @FlloriiN91
    Tbtk works very well with Unity 5.6 but i had ui problem before which is not related to tbtk directly and easy to fix in 1 min.
    i am developing game right now there is no major issues i have seen so far.
    i dont use cover so i dont know much about it.
    lastly it is optimized my game worked on mid level anroid phones.

    @digiross
    Never tried non flat terrain.
    There is a GUI that you can edit user stats.
    I am not much experienced .net dev to answer that but you can ask here songtan mostly respond us in short time if we have a problem.
    i dont know.
     
  38. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Sorry for the slow respond. I've been away for the past few days. @ponasoft, thanks for answering some of the questions for me.

    @FlloriiN91
    - Are the problems with the new Unity 5.6 fixed (UI, etc.)? is it working ok now?
    It's fixed now as far as I know.

    - Are there major issues on it? if someone knows can they give me some examples of bugs?

    There are none as far as I can tell. I'm constantly on watch for feedback with bug. If anyone found one and let me know, It will gt fixed.

    - Does the cover system work well? (i want to make an xcom like game so the cover system will be a main gameplay pillar)
    See for yourself, there's a level with cover system just like xcom in the web demo.

    - It is optimized for Android? IOS?
    yes. The base code are. However the performance is still subject to other asset that you use. So it won't help if you are using some high-end art asset.

    @digiross
    - Will this asset work on non-flat terrains, it seems at one time it was only for flat?
    You can adjust the grid to have varying height. However doing so you break up the individual tile in the grid (the grid won't be projected to the terrain). And the system doesn't take into account of height. So the varying height will have no bearing on the game play.

    - Is it possible to add/edit/delete unit statistics? With or without coding?
    There are editor to edit the value. However you will need to code to add/remove things.

    - Is the asset c# code commented well for easy understanding?
    It's not entirely commented. There are section that are fairly straight forward and there are section that gets rather complicated. This will depend on your own understanding of C# and unity.

    - Is their a recommended fog of war asset that works well with this?
    There's a built in fog-of-war system however it only conceal things on the grid. I'm not aware if there are other asset that will work 'well' with this one. I never checked. But chance are you will need to put in some work to get it working.
     
    FlloriiN91 likes this.
  39. FlloriiN91

    FlloriiN91

    Joined:
    Feb 26, 2015
    Posts:
    6
    Thank you for the info. I played the demo and looked at the videos from youtube.
    Two more questions about the cover system if i may:
    - I saw in the Unit Creation video that there are only a few animation boxes (move, idle, etc) that can be changed. Can I add more animation boxes besides those? cover, throwing, and others directly with your framework or do I need to code it.
    - The last one :) - Is there an option for the bullets / beams to hit the walls in front of the enemy (if there is one) or show the 0% chance but do not let the user shoot the target?
    Thank you.
     
  40. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    - Can I add more animation boxes besides those? cover, throwing, and others directly with your framework or do I need to code it
    I'm afraid you do need to do some modification. First to the AnimatorController so that it support all these new animation for these action, then the code to trigger those animation. You can still use the existing code base, you just need to extend it to support these new action.

    - Is there an option for the bullets / beams to hit the walls in front of the enemy (if there is one) or show the 0% chance but do not let the user shoot the target?
    By default, the shoot-object will never hit the cover/obstacle in front of the target. The way the system work is first to determine if the potential target is in line-of-fire, only then the hit chance is calculated. So if the target is in line-of-fire, they can be attacked regardless of the hit chance. But If the target is not in line-of-fire, you can't attack it.
     
  41. FlloriiN91

    FlloriiN91

    Joined:
    Feb 26, 2015
    Posts:
    6
    Thank you for all the info. I've already bought it and it's awsome :) great, great job man. It's already above what i had expected. I will work with it, try to understund th code and remodify it as mentioned above, and if i have anithing else to ask you i will contact you. (Do you have an email or something or just post it here on the forum?). Thank you again.
     
  42. Song_Tan

    Song_Tan

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

    Check the documentation or the drop down menu. That's where you will find all my contact info.
     
  43. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hi Songtan,

    I'm hoping you can help me out. I'm finding that the touch rotate controls are really off on my version. I think the code is the same or very similar to your code as I haven't changed it myself. However, I haven't checked against the latest version of the code so you may have fixed this in your version. I find that 2 finger touch rotate is really sensitive on most devices. It seems that if you put two fingers to rotate the screen, even very small finger movements cause big camera rotations. However, large finger rotations don't have that much of an effect. Seems like something is inverse here but I can't figure it out because the code doesn't make much sense to me. All the Euler angles and stuff is beyond my coding ability:

    Code (CSharp):
    1. if (enableTouchRotate && !UINGUI.instance.isShopScreen)
    2.             {
    3.                 if (Input.touchCount == 2)
    4.                 {
    5.                     Touch touch1 = Input.touches[0];
    6.                     Touch touch2 = Input.touches[1];
    7.  
    8.                     Vector2 delta1 = touch1.deltaPosition.normalized;
    9.                     Vector2 delta2 = touch2.deltaPosition.normalized;
    10.                     Vector2 delta = (delta1 + delta2) / 2;
    11.  
    12.                     float rotX = thisT.rotation.eulerAngles.x - delta.y * rotateSpeed;
    13.                     float rotY = thisT.rotation.eulerAngles.y + delta.x * rotateSpeed;
    14.                     rotX = Mathf.Clamp(rotX, minRotateAngle, maxRotateAngle);
    15.  
    16.                     thisT.rotation = Quaternion.Euler(rotX, rotY, 0);
    17.                 }
    18.             }
    This is the relevant code ... can you let me know if you think there's anything wrong? this is in the Update function of the CameraControl script.
     
  44. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I've only tested the same code recently. I have to say it works relatively well for me. If you think it's too sensitive, have you try lower the value of rotateSpeed? If the direction is inverted, you can try using negative value for rotateSpeed.
     
  45. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Thanks ... I think it's more that the amplitude is inverted. So put two fingers on and do a small movement, gives a fast pan whereas a large movement does not.
     
  46. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Actually, I tested a basic version of your demo and it works correctly in your version. I suspect I'm doing something to make rotate speed too large somewhere else in my code.
     
  47. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    By the way, here's a pic of my next game using my heavily modified version of TBTK. Hopefully will launch on IOS and Android in June of this year. Doing final rounds of testing and fixing now.

    strike team hydra UI by Rajpreet Dhillon, on Flickr
     
  48. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Once again, looks awesome. Congratulation!
     
  49. SoftwareWorkshop

    SoftwareWorkshop

    Joined:
    Feb 8, 2013
    Posts:
    43
    Hi,
    I just bought your asset and I'm wondering if it would be possible to integrate the grid system with some external tool. I'm using DunGen to create the level layout.
    If it's not possible out of the box then could you give me some advice about what needs to be changed to make it happen?

    Cheers
    M
     
  50. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I've to say I'm not familiar with DunGen or how it works in the background. So take what I say with a pinch of salt. I'll say that it's highly unlikely that they will work right out of the box. But I'm sure there will be a way to get them integrated. You will probably need to do some modification.

    One of the more straight-forward solution that I can think of for now is use raycast to detect which area in the scene needs to be cover by the grid. The requirement being the level that is generated by DunGen needs to have collider on them, at least on any walkable surface. You can then modify the grid generation code in TBTK to only generate grid in the area containing those collider.