This is a demo of the GDScript (Godot engine) implementation of Mingos' Restrictive Precise Angle Shadowcasting (MRPAS) algorithm.

MRPAS is an algorithm used by traditional roguelike games for determining which map cells are in the player's field of view.  For more details about the algorithm, see the overview on RogueBasin.  http://www.roguebasin.com/index.php?title=Restrictive_Precise_Angle_Shadowcastin...

After launching demo, arrow keys or WASD can be used to move.

Source code for this implementation is available on Github.  https://github.com/matt-kimball/godot-mrpas


Comments

Log in with itch.io to leave a comment.

Hello, thanks for your work :) your mrpas is really helping me out on my project. I wanted to ask if you had any idea about how to optimize multiple mrpas in a single scene ?

Basically I'm working on a tilebased tactical (think fire emblem) but where every unit has a field of view, and units are themselves obstacles. It means that currently, when a unit move, every other units get the notification that a unit moved, set the transparency of the unit's old and new position, and recompute their field of view. As you imagine, it causes a bit of lag.