Author Topic: Tasharen FOV - How does it work?  (Read 5454 times)

Omi

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Tasharen FOV - How does it work?
« on: September 17, 2015, 08:10:21 PM »
Hello!  I am considering purchasing Tasharen FOV for use in a 2D platformer and had a few questions.  I've read around these forums and can infer that it scans along a plain (XZ by default) and is geared towards 3D games.

Every transform in my game that isn't superficial or part of the background sits at Z=0, and the game is built along the XY plain.  Because every wall that would block LOS is essentially paper-thin and facing the camera, I'm wondering if this asset would be a fit for my project.

Also, does your FOW system report to game objects when they are visible or not?  How does it effectively hide things that are not in view?

I imagine your solution is pretty straight-forward, but I couldn't find any documentation about how it works.

Tasharen FOW looks pretty sweet.  I've been very happy with both NGUI and Tnet (though I've discontinued using Tnet since Unity 5).


Thanks for all you do!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen FOV - How does it work?
« Reply #1 on: September 20, 2015, 03:58:53 AM »
The FOW system itself is fairly abstract and will work with paper-thin elements. FOW figures out the line of sight by generating an internal 2D heightmap first. It's set to do it using raycasts by default, but you could change it to be anything you like by creating a class derived from FOWSystem and overwriting the CreateGrid() function.

Now changing XZ to XY is more of a hassle and involves shader modification that I've posted about a few times here, as well as changing FOWSystem.IsVisible/IsExplored to use Y instead of Z.

Omi

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Tasharen FOV - How does it work?
« Reply #2 on: October 01, 2015, 05:03:55 PM »
Thanks for giving me a very concise answer and implementation!  I'm going to assess my needs for a bit longer (frankly, it's not quite time to worry about FOV yet) but as of this moment I am convinced to  buy.