Fog of War Question

Ask any questions that come up while using the PC or Android IceBlink 2 Engine

Fog of War Question

Postby zach_holbrook » Tue Apr 11, 2017 2:29 am

What tile is used for the black fog of war tiles? Or does fog of war not use the graphics assets in the typical way? I'd like to make the blackest fog of war just slightly transparent.
zach_holbrook
 
Posts: 48
Joined: Mon Dec 26, 2016 5:52 am

Re: Fog of War Question

Postby youngneil1 » Tue Apr 11, 2017 5:51 am

The tile for fog of war is offScreenBlack.png. Currently it is hidden in default/NewModule/ui. When you want to use a customized tile to replace it, just save your customized tile into modules/yourmodulename/graphics, naming it the same, ie offScreenBlack.png. Same named files in your modules folders always take precedence over resources from the default/NewModules folders.
User avatar
youngneil1
Backer
Backer
 
Posts: 3844
Joined: Sat Dec 08, 2012 7:51 am

Re: Fog of War Question

Postby youngneil1 » Tue Apr 11, 2017 8:04 am

I played around a bit with this myself and ran into various problems.

Making the default fog of war a bit transparent reveals a few problems under the hood:

1) There's still some grid paper graphic drawn undernetah (hidden by the fully opaque black), this is an easy fix in next beta version.

2) The fog of war tiles are drawn to overlap each other a bit right now. This creates a structure that looks like a solid black grid. I wonder why I needed the overlaps in the first place - I think it was related to the the movement of light (flicker).

It will take me a bit to sort this, but - as always -we will get there :) .
User avatar
youngneil1
Backer
Backer
 
Posts: 3844
Joined: Sat Dec 08, 2012 7:51 am

Re: Fog of War Question

Postby youngneil1 » Wed Apr 12, 2017 7:49 am

Still, working on this one. Deleted my first fix for this again and restarted my efforts. My old code is so messy that it's a pain in the backside to optimize and expand. Oh well, then again I am simply happy I got it working in the first place :) . Gotta be humble and appreciate the slow, but steady learning curve.
User avatar
youngneil1
Backer
Backer
 
Posts: 3844
Joined: Sat Dec 08, 2012 7:51 am

Re: Fog of War Question

Postby youngneil1 » Wed Apr 12, 2017 7:35 pm

I think I got it here -> there will be a property for setting fog of war opacity in module settings next IB Beta version. It will work rather fine with current lighting options, with one caveat: once it is reduced from default 1.0f (ie once the fog of war becomes slightly transparent), the light ingame will stop shifting its position (dancing shadows off). I like the slightly transparent fog of war btw, fine idea, Zach :).
User avatar
youngneil1
Backer
Backer
 
Posts: 3844
Joined: Sat Dec 08, 2012 7:51 am

Re: Fog of War Question

Postby zach_holbrook » Sun Apr 16, 2017 4:17 am

Thanks for this! Looking forward to experimenting.
zach_holbrook
 
Posts: 48
Joined: Mon Dec 26, 2016 5:52 am

Re: Fog of War Question

Postby youngneil1 » Sun Apr 16, 2017 11:40 am

I hope it works out well on your end :) .

You can adjust the transparency under "Edit/Module", then look for the property fogOfWarOpacity. It ranges form 0 to 1.0f. The lower you set it, the more transparent fog of war (and darkness) become.

Another new property you find there is spritesUnderOverlays. When set to true, the overlays for fogOfWar, darkness or time of day tint are dran on top of sprites, espeically weather. This makes the weather effects a bit more subtle.
User avatar
youngneil1
Backer
Backer
 
Posts: 3844
Joined: Sat Dec 08, 2012 7:51 am


Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron