Description

This small set of scripts are ideal for anyone making grid-based games that wants a light and easy to use fog of war system. The basis for the scripts are tiles, which are layered over the room then cleared away around a given point when required. You can add multiple instances which clear the fog to the room.

As a bonus, the scripts also permit a VERY basic grid-based lighting system, which only permits one light source, but that source will convincingly illuminate a given area, and cast tile "shadows" behind any blocker instances.

Please note that the scripts use a rounding method to convert room coordinates to grid coordinates, meaning that you may have to offset the origin (x,y) by about half the tile size +1 when calling the update script. So for a 16x16 tile size, the arguments would be (x + 9, y + 9). The actual values you use will depend greatly on the tile size you have and the origin of the instance calling the script.

UPDATE: There is now a new script included with this to calculate the correct grid squares between two points. This is called "Bresenham's Line Algorithm" and is VERY handy in a number of situations. It is a stand-alone script so that you can use it in other games or situations.

More info

End User Licence Agreement (EULA).

Changes in 1.1.0

  • Minor tweak to the Bresenhams script to make wall detection and tile choice better. Most noticeable in narrow corrifors, where previously there was more of one side shown than the other. This is no longer the case.
  • Scripts should now work with sprites that have a center offset rather than a corner offset, although this is not the recommended choice
  • Overhauled the demo GFX to make it more attractive... :)

Version 1.1.0. Published October 6, 2014

Created with GameMaker: Studio v1.4.1451

Age Rating: 4+

Privacy Policy

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Jan K 03 December 2016

An above average yet simple FOW.

There are some very crude FOW tutorials and then some extremely advanced shading engines. I looked for a middle ground like this - simple, but powerful. However, I'm lacking following features:

- Multiple light sources. This is a big one, a difference between making a single character vs squad-based game, not to speak of other light sources on the map (campfires, enemies, fireballs).
- An Explored-But-Covered-Again fog of war.
- detection if an object is in dark, or revealed.
- a "rounding up" of the darkness edges, from squares to lines, just like in Dark Disciples 2. I tried to do it myself and it looked terrible.
- as much as I like the tile solution, it is an obsolete function on GMS2.


Gravatar

David W 15 July 2015

Works Great.

Great script!


Gravatar

Waldemar R 15 July 2015

great idea, great work

Thank you for providing this library to the GM community.

Kind regards,

Waldemar


Gravatar

Oliver H 29 August 2014

Great work, as usual

This is the fourth script I bought from Nocturne Games. Combined with Roguelike Maze Generator, Optimise Objects and Essential Autowall you get a pretty quick start into writing a decent Roguelike yourself. You shouldn't buy this scripts, if you just want a Roguelike game generator. You still need a lot of work and at least good knowledge of GML to make them work together (although they all work on their own, if you just need their purpose).

Yes, there are some things I would do differently. The scripts could be more flexible (e.g. by NOT using object names directly, but define them in an init script), but let's be honest: you don't buy these scripts to use them, but to learn how other people do stuff. And you learn best by modifying and improving.

Nocturne Games' assets are among the best you can buy here. Seriously!

This review was left for a previous version of this asset.

What is the issue?

Back to Top