Learn how to only show what is visible around the player with this field of view algorithm tutorial.
Tommy Leung from Ourcade writes: "Are you are making a roguelike or dungeon crawler?
Do you want the player to only see what is visible based on where they are standing?
Where enemies or items behind a wall, in the next room, or around the corner should be hidden until the player has line of sight?
Then what you need is a proper field of view algorithm.
Another alternative is this simpler fog of war effect if you don't need a proper field of view..
In this article, we will go over using the MRPAS algorithm to implement a field of view effect in Phaser 3 with tilemaps."
The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
- By Emanuele Feronato
- 155 Pages
- 28 Source Code Examples
- Build a complete game from start to finish
- Cross Platform
- Scaling for devices