Line-of-Sight Performance issue, How use efficiently?

0 favourites
  • 2 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hello,

    I'm working on tile based line-of-sight, in my case there is Unknown tiles, Out-of-sight tiles (OOS tiles) and shadow tiles.

    They work in way that is hard to explain, so here is example:

    Now it works and looks good, but issue is performance.

    The way I implemented line of sight related to walls, seems to really choke performance.

    For example, OOS tiles, I hide them if you have line of sight to it. Of course, issue is that if wall (sight blocker) and that OOS tile are in same tile then player will never have sight to that.

    So I made

    player has LOS on wall

    Wall is overlapping a OOS tile

    Then > hide OOS tile

    Map size (more OOS tiles) doesn't really impact performance but as I add more walls performance start to fall. I assume there's something with that "Wall is overlapping a OOS tile" that causes issues...

    Any suggestions how I make that detection properly?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I tried this:

    Player has LOS on wall

    then For each wall

    Wall is overlapping OOS tile

    Hide OOS tile

    This really improved performance, tho, debug says that vision controls still uses a bit of cpu.. but atleast its not chokingly bad.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)