Line of sight based fog of war/tilemap reveal

Get help using Construct 2

Post » Mon Feb 01, 2016 2:06 pm

Hello everyone!

I've just started working on an engine for my top-down shooter game. I'm considering making the levels reveal gradualy based on distance from player, and player's line of sight. What would be the best method to approach this? Oh, and it's not momentary - once the map is uncovered, it stays uncovered.

Currently, all the level graphics are based on tilemap and I thought that maybe I could use another tilemap above the bg and obstacle layers (with a single black tile, covering the map area) and just remove tiles based on line of sight but I don't know how to do that. I can remove tiles based on X,Y position, is there an expression I could use?

Tilemaps aside, I've managed to get this working with "tiled background" or "sprite" but covering the whole map with fog objects is tedious and I have my concerns that it's not the most optimal solution. If this doesn't hurt performance and is an OK solution, I guess I could just write an event to fill the map with the fog tiles automatically to save the manual labor.

Also, potential future problem: the line of sight check might require some extra "proximity", I'm vorried that the "outside corners" (between the areas accessible by the player and the outer void of the level) will not become visible since they won't be hit by the LoS check.

Thanks a bunch!
Posts: 10
Reputation: 262

Post » Sat Dec 24, 2016 9:39 pm

Necroing this thread because I want to implement a similar system and my solution causes some performance issues
Posts: 1
Reputation: 186

Return to How do I....?

Who is online

Users browsing this forum: MuchaDev, tetuan, tikuna and 5 guests