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.
Version 1.1.0. Published October 6, 2014
Created with GameMaker: Studio v1.4.1451
You can only review assets you've bought.
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.
great idea, great work
Thank you for providing this library to the GM community.
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.