Temple of The Roguelike Forums

Development => Programming => Topic started by: ido on February 08, 2008, 10:09:27 PM

Title: fov: radial or square?
Post by: ido on February 08, 2008, 10:09:27 PM
I currently use radial fov in cryptrover, but am thinking about changing it.

Radial looks nicer, but causes all kinds on annoyances because it doesn't reveal the 'edges'.
Logically it also makes less sense, since diagonal movement in the game is not more expensive than straight movement.

Which do you think is better?
Title: Re: fov: radial or square?
Post by: stu on February 08, 2008, 11:35:58 PM
I use octagonal fov.  square looks aweful
Title: Re: fov: radial or square?
Post by: ido on February 09, 2008, 12:20:32 AM
I use octagonal fov.

Why not radial then? As far as I can see the two have exactly the same disadvantages.
Title: Re: fov: radial or square?
Post by: purestrain on February 09, 2008, 12:37:43 AM
I cant see the difference. The algorithm itself is responsible for annoyances, not the distance break condition. Does it a difference whether i break at ( (dx*dx)+(dy*dy) > 100) or (abs(dx)>10 or abs(dy)>10) ?
Title: Re: fov: radial or square?
Post by: ido on February 09, 2008, 12:47:44 AM
Does it a difference whether i break at ( (dx*dx)+(dy*dy) > 100) or (abs(dx)>10 or abs(dy)>10) ?

Yes - in the first case you stop much earlier in the diagonal directions.
Title: Re: fov: radial or square?
Post by: JoshuaSmyth on February 09, 2008, 08:38:27 PM
Radial looks better in my opinion.
Title: Re: fov: radial or square?
Post by: Gamer_2k4 on February 09, 2008, 11:10:30 PM
It's up to the developer, I think.  Square FOV is correct based on gameplay mechanics, but radial FOV looks a heck of a lot nicer.  Also, I've been playing roguelikes for years, and I've NEVER heard a player complain about circular vision.
Title: Re: fov: radial or square?
Post by: ido on February 10, 2008, 12:13:08 PM
Also, I've been playing roguelikes for years, and I've NEVER heard a player complain about circular vision.

I have :)

But then again, both the fov and time are quite constraint in cryptrover, so being able to see more is more critical than in a lot of rl's.
Title: Re: fov: radial or square?
Post by: Z on February 11, 2008, 12:16:01 PM
Be original and write a hex roguelike with hexagonal FOV. ;)
Title: Re: fov: radial or square?
Post by: Anvilfolk on February 11, 2008, 05:04:28 PM
Original? Try triangular ;D
Title: Re: fov: radial or square?
Post by: Marvel on February 13, 2008, 10:12:49 PM
Original? Try triangular ;D
Good idea for 7drl! Does it implemented somewhere?
Title: Re: fov: radial or square?
Post by: Anvilfolk on February 13, 2008, 11:38:00 PM
No, unfortunately it was just a weak attempt at a witty remark ;)
Title: Re: fov: radial or square?
Post by: Z on February 15, 2008, 12:34:42 PM
How would that work, actually? From each triangle you can move to three other triangles? Or to any of 12 triangles which are connected by edge? How would missiles go?

Or, the player is living on upward facing triangles (which form a normal hex board), and the monsters are living on downward facing triangles?
Title: Re: fov: radial or square?
Post by: purestrain on February 15, 2008, 07:11:18 PM
I think talking was about FOV only.
Title: Re: fov: radial or square?
Post by: gerryq on May 13, 2008, 03:22:30 PM
Radial looks better, no doubt about it.

Personally I didn't bother with it in Lair of the Demon Ape - you can see as far as all edges of the game window if nothing is blocking your view.   The square lit region doesn't look great on the map screen, but I don't think that's a major flaw, as you will only be looking at that screen intermittently.

I used radial for Potions of Earth Sense (magic mapping) because it looks better, even if it clashes with game mechanics.  Also there is a small gameplay advantage, as wizards with a magic mapping spellbook cannot easily map out the whole dungeon as a grid.

How much does limited FOV add to a game?  I'm not convinced it adds much - even if FPV is unlimited, a monster could still be lurking around a corner or behind an obstacle.
Title: Re: fov: radial or square?
Post by: I_Own_The_Letter_O on May 13, 2008, 03:53:25 PM
Not having gotten the stage where I need FoV yet I'm probably not qualified to enter this discussion, but I have started to think about it as it is the next thing I'm implementing after I've finished the various dungeon/terrain generators.

I am planning in daylight for the character to see the entire map cell they currently occupy. (barring tiles that are obscured by something else like a tree or a monster or a tree monster on fire). But the FoV around the character comes into play during darkness/twilight/dawn and gradually shrinks in around you at which point it will become radial.

I like to think of diagonal movement as 1.414 times as expensive as orthogonal (based on triangles and the square root of 2 blah blah blah) and this lends itself to a more radial field of view than a square one.

Ultimately as the OPs movement is the same orthogonally and diagonally it comes to a question of functionality versus aesthetics.