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




Friday, 28 March 2014

TBTK Update (v1.0.7)

So I've updated TBTK a few days ago. With this update the vertical component for the grid is finally in place. let me explain what is it all about.

The grid can now be fit to a terrain/scene that has height variation. The system is pretty flexible imo, any collider with the designated layer can act as the terrain. The tile will adjust itself so it fits just above the terrain, in a perfectly horizontal manner. You can specify the minimum height difference required across the tiles to be considered of different level. I've design the system with XCom:EnemyUnknown in mind. So it works best when the level has a very well defined height level without too much slope. It still works with slope of course, but unless the tile size is relatively small compare to the elevation, the tile may seems partially sink into the terrain. In that case, some manually adjustment might be needed.

The height difference across different tiles will affect the gameplay in the sense that moving across tiles with different height will cost movement point. The bigger the height difference is, the bigger the cost. Also unit attack from higher ground will gain a bonus in hit-chance. On the other hand, any attack made from lower ground will suffer a hit penalty. The value of the movement cost and the hit bonus/penalty can be configured of course.


You can probably tell from the image that all the existing feature work with the new height element. Terrain can be used as cover if desired (just slap a Obstacle component on it) and will block line of sight when fog-of-war is enabled. Obstacle object can be place on any tile of any height. Walls can be used to block of adjacent tiles with height difference to create a cliff face.

The only thing I might left out is the movement and animation. There's no special animation movement pattern support for movement. The way I see it, there's no one size fits all solution for this due to the fact that the model of the unit can be anything and each can require a very different movement pattern and animation code. I'll just wait and see what's the user comment on this.

Apart from the vertical component, I've also tweak quite a lot of the internal working in hope of optimizing/improving the framework, and the bug fixes of course. They full change log is as follow:


Version Change – v1.0.7
addition/change
  • change the way grid info is serialized which should improve grid generation time and grid limit
  • added height component to the grid (see example scene – ExHeightComponent)
  • optimized the AI code so it's more modular and easy to work with.
  • improve a few things about how ShootObject works
  • added effect type 'damage reduction' to unit ability

bug fix
  • spawn unit will now work with ability that “shoots”
  • ability with shootObject will now shoot towards their target (both unit or tile) instead of just tile
  • using ability no longer reduce the attack count available on a unit in the turn
  • fix bug where AI unit with movement disabled will not attack
  • fix bug where all attack never missed

9 comments:

  1. Awesome! Thank you so much for all you've added that was never promised.

    I've played around with the latest patch a bit. The first question that comes to mind is, can there be multiple levels occupying the same tile coordinate? For example an interior of a building and the roof?

    I assume not in this first release but I was just curious.

    Great work as always!

    ReplyDelete
    Replies
    1. Thanks for the compliment. You are right, multi-level stacking grid is not supported at this point. Thing is it's one thing to support height variance on the grid, it's another to stack a level of tiles on top of another. I imagine even if I do actively try, it wont be happening anytime soon. There are a lot of details that need sorting when it comes to that, both from the implementation stand point and end user stand point.

      Delete
  2. Hi Song, I purchased the TBTK - v1.0 from your website, but the link no longer works. Could you fix the link please? Or shoot me an email at easonh8@gmail.com. Thank you so much!

    ReplyDelete
    Replies
    1. I just sent you an email right before you post. Please check again.

      Thanks for your purchase btw. Hope you enjoy it.

      Delete
  3. Hi!

    Very nice kit! Have only 3 questions!

    1- I see you used a kit of ladder to show where an unit could climb on the platform. I suppose this can changed with a kind of slope tile ? which a tank can only go facing a specific direction ?
    2- Are shooting line of sight take height of obstacles into consideration ?
    3- Are height raise the actual shooting range of an unit ?

    Thanks!

    ReplyDelete
    Replies
    1. 1. Unfortunately that's not the case, there's no magic 'slope' tile. But what you can do is create a slope across one or more tiles, block off the side so the unit can only go from one direction.
      2. Yes
      3. Height doesnt raise the shooting range of the unit. But that can be done with some relatively straight-forward modification.

      Delete
    2. That great. Well the question 1 got answered. That actually what i meant.. creating a tile slope and block both side so an unit can only pass there. Offcourse, some animation would need to be added. Thanks for the answers!

      Delete
  4. This comment has been removed by the author.

    ReplyDelete