Always here to help Sketchy. But thanks for sorting out those minor issues. Thanks to it your example is even more reliable and easy to use than before.
It would be nice to see the "fog of war" fade into black and possibly not be so "square"?
Would it be possible to some sort of raycasting effect? Shoot a ray in every 360 direction and when it hits a wall, everything behind that would be black??
I don't mean to pick this apart. It's amazing! Keep up the good work
Just use erase blend.
Add a black layer and make the active object postitioned to the player with the ereas blend.
The darker alpha channel the more will be erased
Not sure what you mean about fading to black - walls and floor tiles already fade to black the further away they are.
Also, it does use grid-based line of sight, so everything behind a wall is black.
Doing precise shadows on the ground with a raycaster is easy enough to code (see Andos' example), and that's actually what Fanotherpg is planning to do, I believe.
The problem is that I'm not totally convinced MMF2 is up to it - the raycasting and 3D engines are very CPU-intensive, so if you put them both together, and then add all your game content (enemies, projectiles, special effects, etc) on top of that - I think it could turn into a slideshow (but hopefully I'm wrong).
Also, I don't think it would be possible to draw precise shadows on the walls themselves, and it would look strange if the shadows on the ground don't match those on the walls.
Apart from that, and it obviously being much easier, the other reason is that if I do use this in a game, it will be in a turn-based, grid-based strategy - meaning the shadows need to be grid-based, so the player can tell which squares are visible.
That'll work great for making the floor fade to black. The lightness of the walls should probably depend on the angle to the player though - although now that I think about it, my example doesn't do that yet...
Realistic shadows will require something more complicated.
This is the real problem:
While it's easy to draw accurate shadows on the ground, there's no way to draw shadows on walls, and it just looks weird.
I don't see how.
You could have the shadows (surface object) layered on top of the walls, but it still wouldn't look right, because the angle would need to change due to the perspective difference - the edge of a shadow should always appear vertical. I guess it would be technically possible, but the maths would be pretty scary.
It would be extremely difficult to use extra objects for shadows on walls, and would mean doubling the number of wall surfaces to be drawn, which is likely to be slow.
LOL, Del Duio and who says we don't have them? TBH I'm not so great in those blocks, and you kick my asses but still Sketchy is showing quite nice skills over here.