Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I guess I was thinking something like this: 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)



This 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.


Right.

I was thinking about whether there could be a way to apply your technique, without having to do the polar + cartesian conversions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: