WarsmashModEngine icon indicating copy to clipboard operation
WarsmashModEngine copied to clipboard

Fog of war

Open v4dkou opened this issue 2 years ago • 2 comments

To replicate W3 gameplay, there should be a Fog of War mechanic

  1. Unit line of sight (probably some low-res ray-tracing on the tile grid)
  2. Visual effect

v4dkou avatar Sep 14 '22 23:09 v4dkou

Sidenote for whoever does this, there was a bug in Reforged when they rewrote the shaders for emulating the old classic graphics where unit portrait faces in 3D that emitted particles would use the X/Y of the particle in the portrait's coordinate space compared against the game world's fog of war coordinate space and then dim the portrait's particle based on the (0, 0) point essentially in the game world and whether that point had been explored. It was really funny once someone explained it to me -- you could see it with the Wisp portrait especially, which would be dark until you explored a particular region of the map.

It's actually really likely that whoever implements this stuff would make the same mistake in Warsmash given that the portrait coordinate space and the world view are two 3D scenes with a lot of code sharing. So, yeah, don't do that :)

Retera avatar Sep 15 '22 00:09 Retera

https://www.youtube.com/watch?v=FEYrvLCeyrQ

Some progress has been made on this, but although the terrain shader is mostly working it does not hide units outside the explored area yet.

Retera avatar Feb 18 '23 12:02 Retera