Today, 01:57 AM
More work was done.
First, I revised the way the map is revealed.
Originally, it used to be revealed by the player, whereby he updates the entire grid, checks to see if the events are hidden unless in X-range tiles, and then redraws the remaining static and dynamic fogs within the field-map's spriteset. The mechanics also worked for events, and each event... when it moved.. would do the same. But with a large number of events, it would likely slow down (a little or a lot depending on the code). Imagine if ten events moved in unison... it would attempt to refresh the fog ten times!
So I thought... the field map gets updated after every event... Hrm.....
Well, each event COULD... update the grid, sure enough. It would perform the math of what map areas were erased or not. But after that, I would have it set a form of "REFRESH THE MAP" flag.
So now, IF an event moves and erases some fog, it merely sets a flag rather than forcing the field to update. And if five or eight events move and erase some fog, that one flag STILL gets set. Executed within Game_Map itself, the fog will only be updated once no matter HOW many events have moved to trigger it.
Now in the demo, I set the opacity of the STATIC fog to something less than solid, whereby I can barely see the trees underneath. However, I found that there was an area around my player that was a bit... tile wary.
It appears that Wachunga thought to 'erase/remove' the fog of the dynamic map where the static map existed with a scant amount of overlap. However, the removal was ... in my opinion... JANKY!
So I made a new configuration variable to DISABLE the 'dynamic-fog-removal' feature. Or precisely, to enable it as it is a feature wachunga put in by default. Yes, allowing both the dynamic and static fog will make the static area darker and more solid, but it is a hella better trade-off.
I renamed a few CONFIG variables, but I did so much more in breaking up the system into bite-size pieces for easier observation and study.
Soon... to release (I guess?) I hate writing instructions... even if already partially written...
Fog of War Demo.zip (Size: 953.81 KB / Downloads: 1)
First, I revised the way the map is revealed.
Originally, it used to be revealed by the player, whereby he updates the entire grid, checks to see if the events are hidden unless in X-range tiles, and then redraws the remaining static and dynamic fogs within the field-map's spriteset. The mechanics also worked for events, and each event... when it moved.. would do the same. But with a large number of events, it would likely slow down (a little or a lot depending on the code). Imagine if ten events moved in unison... it would attempt to refresh the fog ten times!
So I thought... the field map gets updated after every event... Hrm.....
Well, each event COULD... update the grid, sure enough. It would perform the math of what map areas were erased or not. But after that, I would have it set a form of "REFRESH THE MAP" flag.
So now, IF an event moves and erases some fog, it merely sets a flag rather than forcing the field to update. And if five or eight events move and erase some fog, that one flag STILL gets set. Executed within Game_Map itself, the fog will only be updated once no matter HOW many events have moved to trigger it.
Now in the demo, I set the opacity of the STATIC fog to something less than solid, whereby I can barely see the trees underneath. However, I found that there was an area around my player that was a bit... tile wary.
It appears that Wachunga thought to 'erase/remove' the fog of the dynamic map where the static map existed with a scant amount of overlap. However, the removal was ... in my opinion... JANKY!
So I made a new configuration variable to DISABLE the 'dynamic-fog-removal' feature. Or precisely, to enable it as it is a feature wachunga put in by default. Yes, allowing both the dynamic and static fog will make the static area darker and more solid, but it is a hella better trade-off.
I renamed a few CONFIG variables, but I did so much more in breaking up the system into bite-size pieces for easier observation and study.
Soon... to release (I guess?) I hate writing instructions... even if already partially written...
Fog of War Demo.zip (Size: 953.81 KB / Downloads: 1)