Wachunga's Fog of War - Enhanced Edition
#1
Wachunga's Fog of War
Enhanced Edition

Version: 3.0


fog of war (Noun)
  1.   The uncertainty in situational awareness experienced by participantsin military operations.
  2.   The shrouded concealment of enemy activity outside of areas observable by a player's forces.

Introduction by Wachunga
Wachunga Wrote:A map specified as having "fog of war" (fow) has tiles that are (fully or partially) obscured until the player gets within visual range. The amount of fow to disappear as the player moves depends on the visual range specified. Gamers with experience playing Real Time Strategy games like Warcraft, Age of Empires, etc. should be quite familiar with the concept.

This script supports two kinds of fog of war: static and dynamic.

Static fow is the kind that typically hides terrain in RTS games. It covers the entire map until the player explores the area, discovering the underlying terrain. Once static fow disappears from an area of the map, it stays gone indefinitely (even if loading a saved game, leaving the map and returning later, going to the menu, etc).

Dynamic fow is identical to the static kind except that it doesn't stay gone forever: as soon as the player leaves visual range of an explored tile, dynamic fow covers it again. This kind of fow is typically used to hide enemy units in RTS games.

Note: I've taken great pains to optimize this script as much as possible (which unfortunately reduces the readability of the code). There shouldn't be much visible effect on frame rate.



Features
  • Allow both Static (removable) and/or Dynamic (persistent) fogs in a map
  • Set transparency levels and visible ranges
  • Allow for custom fog tiles, ranges and fog transparencies per map
  • Option to remove excess overlapping fog defined and added into the config
  • Two ways to define maps that have fogs
  • Allow custom events to erase static fogs just like the player
  • Two ways to define custom fog-removing events
  • Script call to remove or restore fogs
  • Script call to permit/revoke an event's ability to erase static fogs
  • Fog complete and percent complete script calls



Demo

Box Com Link
* As a Box.Com demo, there is 'no preview'.  Just click the DOWNLOAD button in the corner.


Instructions

All within the demo.  I spent three hours working on them, they BETTER be good enough.


FAQ

I broke the script down into its individual classes for study.  Then I went through and broke the larger methods into smaller units which allowed for easier study. Wachunga was a member of the RMXP SDK circa 2006 on up, but this was before the SDK was considered, so the original comments were not up to the RMXP SDK standard at the time.



Compatibility

Nothing was over-written. There were sections that aliased/attached code  to existing methods within Game_Map, Game_Character, Spriteset_Map and the like. 



Credits and Thanks

To Wachunga who crafted the original, and spawned other scripts of its ilk, and to Tepe who requested the feature for map erasing events that brought about this endeavor.


Author's Notes

B-FLAT [Image: musica25.gif]


Terms and Conditions
Free for use, even in commercial works. However, due credit for myself, Wachunga and Tepe is required.
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 }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Super Simple Vehicle System - Enhanced DerVVulfman 65 94,681 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Enhanced Squad Movement DerVVulfman 5 6,590 02-24-2023, 04:40 PM
Last Post: DerVVulfman
   Text Scroll Script - Enhanced DerVVulfman 23 34,262 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Super Simple Vehicle System - Enhanced - Vehicle Placement DerVVulfman 2 6,140 05-22-2014, 04:42 AM
Last Post: DerVVulfman
   Ccoa's Caterpillar / Wachunga's Footprints Patch DerVVulfman 4 10,051 02-13-2013, 04:56 AM
Last Post: DerVVulfman
   [XP] Enhanced Details xuroth 5 13,024 03-17-2012, 06:35 PM
Last Post: Kain Nobel
   MrMo DVV Add-On #14: Ingrid's Enhanced Items DerVVulfman 2 7,485 07-13-2011, 11:51 PM
Last Post: DerVVulfman
   MOG HUD Anpha Edition. vietanh2108 1 6,259 07-13-2009, 09:56 AM
Last Post: computerwizoo7



Users browsing this thread: 1 Guest(s)