Grid Sage Forums

Grid Sage Forums

  • April 30, 2024, 12:29:21 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Author Topic: FOV Could Use Improvement  (Read 2934 times)

Cogsnack

  • Unaware
  • *
  • Posts: 12
    • View Profile
FOV Could Use Improvement
« on: February 04, 2018, 06:19:48 AM »

You should always be able to see down the length of a straight wall when standing next to it. Try it IRL. Make fully occupied cells (like ones with walls) more permissive. Reason is you only need to see an edge or corner of such cells to identify them.

A solution: If cell is fully occupied and diagonal cell closer to viewer is in FOV then permit (handle for each quadrant).
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4318
    • View Profile
    • Cogmind
Re: FOV Could Use Improvement
« Reply #1 on: February 04, 2018, 06:29:29 AM »

That's essentially how FOV already works, at least out to a significant distance. There must be some other factor at play in your particular screenshot there, something special about those particular cells? (Not sure. What's the seed and map? Or better yet, a save there :P)

Whatever it is, FOV is symmetrical in all directions so it's obvious something is going on in that particular setup. Walk around more and you'll see that your image doesn't reflect normal behavior. See here for an example of standard symmetrical behavior and wall distance:
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Cogsnack

  • Unaware
  • *
  • Posts: 12
    • View Profile
Re: FOV Could Use Improvement
« Reply #2 on: February 04, 2018, 06:38:21 AM »

Yes current algorithm works fine in most cases. Every so often I encounter this issue however. So far noticed in SE and NE quadrants. After encountering I investigate and walls seem to be normal, so I don't know why it happens.

Note: Additional requirement for solution above is that diagonal cell does not block line of sight.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4318
    • View Profile
    • Cogmind
Re: FOV Could Use Improvement
« Reply #3 on: February 04, 2018, 06:50:39 AM »

Right, again it could be the map, which is why I asked for a seed. The Mines screenshot is not normal behavior, either. (I haven't seen that before and it hasn't been reported in years of plays, so it's rather odd that you're seeing this.)

I know the FOV algorithm itself is solid so there shouldn't need to be any changes there. Gotta be something else...
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Cogsnack

  • Unaware
  • *
  • Posts: 12
    • View Profile
Re: FOV Could Use Improvement
« Reply #4 on: February 04, 2018, 06:55:00 AM »

I don't have a reliable seed as those shots may have come from earlier runs, but I do know they are Beta 4 and/or 5. Will send seed in future encounters. Using uninitialized array elements during FOV calc would be one suspect.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4318
    • View Profile
    • Cogmind
Re: FOV Could Use Improvement
« Reply #5 on: February 04, 2018, 07:22:39 AM »

Yeah these won't be anything new or particular to Beta 4/5. I'm 100% sure this has nothing to do with the FOV algorithm or data. I've been using the exact same one without changes for about 7 years now and it's fine. (One can eliminate FOV as a possibility anyway, as there is no RNG component in an FOV algorithm meaning these situations would be easily repeatable in that case. All FOV data is completely redone from scratch with every change.)

I'll just need a seed and reliable way to repeat it.

I'm guessing (99.9% sure :P) it has something to do with excavatable map areas that tunnelers plan to dig out. Those areas are not quite normal walls.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Cogsnack

  • Unaware
  • *
  • Posts: 12
    • View Profile
Re: FOV Could Use Improvement
« Reply #6 on: February 04, 2018, 09:13:38 AM »

A couple more examples, but at further distance. I've attached a savegame that corresponds with the second image. If you load it up and walk straight east you'll see the walls at the indicated locations appear.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4318
    • View Profile
    • Cogmind
Re: FOV Could Use Improvement
« Reply #7 on: February 04, 2018, 05:08:54 PM »

Both of these examples are outside the range at which walls along a horizontal are visible, though. This is normal behavior. It does not extend out to your full direct sight range.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Cogsnack

  • Unaware
  • *
  • Posts: 12
    • View Profile
Re: FOV Could Use Improvement
« Reply #8 on: February 04, 2018, 05:29:08 PM »

Shouldn't it though? They're not in line-of-fire (at least for center-to-center traces) but ought still be visible. Raycasts from center of viewer cell clearly intersect at least one wall edge without passing through any obstruction. When you stand next to a wall your vision along it does not suddenly stop because you can't see inside it.

I will try to find closer examples for which to send a savegame, like in the earlier images.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4318
    • View Profile
    • Cogmind
Re: FOV Could Use Improvement
« Reply #9 on: February 04, 2018, 05:37:05 PM »

No, I disagree since even from a realism perspective if you're standing next to a wall you're not going to see it clearly out to your full visual range. Say you can see 1km away; you're not going to be able to tell what a wall looks like (or that there even is a wall) beyond 500 meters. It could very well end, or there could be a pathway through the wall or a door in it. (It's also more interesting from a gameplay perspective anyway, to not be able to see an adjacent wall quite that far away.)

So only the initial screenshots are applicable here, and I'm guessing you'll only see that happen in the Mines and Materials, where excavators can dig. In any case we'll find out.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon