Fog of War
#17
More work was done.  Blushing + Cheery  

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...  Plan   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.

[Image: attachment.php?aid=2753]

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...


.zip   Fog of War Demo.zip (Size: 953.81 KB / Downloads: 1)


Attached Files Thumbnail(s)
   
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
Fog of War - by Tepe - 11-05-2024, 12:42 AM
RE: Fog of War - by DerVVulfman - 11-05-2024, 05:06 PM
RE: Fog of War - by DerVVulfman - 11-05-2024, 06:15 PM
RE: Fog of War - by Tepe - 11-06-2024, 04:11 AM
RE: Fog of War - by Tepe - 11-06-2024, 02:49 PM
RE: Fog of War - by DerVVulfman - 11-09-2024, 08:21 PM
RE: Fog of War - by DerVVulfman - 11-12-2024, 01:13 AM
RE: Fog of War - by Tepe - 11-12-2024, 04:54 PM
RE: Fog of War - by DerVVulfman - 11-12-2024, 05:10 PM
RE: Fog of War - by Tepe - 11-12-2024, 05:58 PM
RE: Fog of War - by DerVVulfman - 11-12-2024, 08:58 PM
RE: Fog of War - by Tepe - 11-12-2024, 09:53 PM
RE: Fog of War - by DerVVulfman - 11-13-2024, 04:02 AM
RE: Fog of War - by Tepe - 11-14-2024, 01:27 AM
RE: Fog of War - by DerVVulfman - 11-14-2024, 02:19 AM
RE: Fog of War - by Tepe - 11-14-2024, 02:29 AM
RE: Fog of War - by DerVVulfman - Today, 01:57 AM
RE: Fog of War - by Tepe - 8 hours ago
RE: Fog of War - by DerVVulfman - 5 hours ago
RE: Fog of War - by Tepe - 2 hours ago



Users browsing this thread: 5 Guest(s)