cyberfilth / Axes-Armour-Ale

A fantasy, ASCII dungeon crawler for Windows, Linux & OSX
http://rogue-axe.tk
MIT License
38 stars 11 forks source link

Should the FoV be aloud to do what's pictured? #12

Closed gcarreno closed 4 years ago

gcarreno commented 4 years ago

Hey Chris,

Should it? :

cyberfilth-fov-strange

This has always baffled me in games, cuz in real life, you can't look through that wall configuration, can you?

Cheers, Gus

cyberfilth commented 4 years ago

Ha, in real life no. I could add a post-processing pass to the FoV to check for diagonal gaps like this and limit the view to a narrower angle but since the character can move in all 8 directions, you are able to squeeze through diagonal gaps in walls like this and it wouldn't be fair to move into a space that you can't see and end up surrounded by enemies.

It may be better to add a post-processing step to the cave generation itself. At the moment it simulates cellular automata and runs through about 5 passes to create the basic cave-like look. Then it divides the map up into a grid and creates a series of circular rooms connected by corridors from left to right. It's this step that creates the 'thin walls' where you are able to step diagonally through the gaps.

I'm note sure whether to close this issue because, although it's unrealistic to see through that gap, it's not a bug in the code. The FoV is doing what it should to allow the player to see the square they are about to move to. Enemies can also see and move diagonally so it doesn't give an unfair advantage.

gcarreno commented 4 years ago

Hey Chris,

No need to alter anything. This question pretty much revealed my ignorance of these types of games and I'm glad you explained it to me so thoroughly!!

Which now give me the option of applying diagonal move on these cases, of which I was ignorant :)

I'll close it, no probs.

Once again, thanks for the good teaching moment :)

Cheers, Gus