3 ms·
I guess I was thinking something like this: http://roguebasin.roguelikedevelopment.org/index.php/Eligloscode http://roguebasin.roguelikedevelopment.org/index.p
by 0x0 14y ago
I guess I was thinking something like this:
http://roguebasin.roguelikedevelopment.org/index.php/Eligloscode http://roguebasin.roguelikedevelopment.org/index.php/Eliglos...
(the second example, "raycasting"). You'd work on the "native tile resolution".
I.e. you just "swipe" lines starting at the player position to the edge of the map, in a circle; as soon as you hit an obstacle tile, you stop marking the tiles ("pixels") on the line as lightened. No need to do any per-object iteration (as long as the tile map contains object references in tile positions)
- JasonSage 14y agoThis works, but gives you no indication of whether the tile is partially visible or not, much less how visible. An accurate indication of this would require many more rays and a lot of processing.
- 0x0 14y agoRight. I was thinking about whether there could be a way to apply your technique, without having to do the polar + cartesian conversions.