Author Topic: Movement and Circular FOV  (Read 23249 times)

Fenrir

  • Rogueliker
  • ***
  • Posts: 473
  • Karma: +1/-2
  • The Monstrous Wolf
    • View Profile
Movement and Circular FOV
« on: August 19, 2009, 03:32:18 AM »
I've FOV working in my game, but right now it's square. I think circular FOV looks better, which is probably a good enough reason, but does it make sense? If moving diagonally takes just as much time as moving horizontally or vertically, it must be the same distance. If they are, then it stands to reason that the player should be able to see just as far in one direction as another. I could make diagonal movement more costly. Any opinions on this?

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Movement and Circular FOV
« Reply #1 on: August 19, 2009, 08:43:50 AM »
I certainly agree that circular FOV looks much better even although it makes no sense.

I don't remember playing any roguelike with diagonal movement more costly, so doing it this way could be original and interesting. (I have played some other games with this, e.g. Rebel Star (a game in style of X-COM and by the same author, but much earlier) where orthogonal movement costs 2 and diagonal movement costs 3, and it was nice.)

You can also try doing a hex roguelike, hex FOV looks cool.

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: Movement and Circular FOV
« Reply #2 on: August 19, 2009, 11:47:45 AM »
What about my 7DRL (zombie roguelike)? ;-) Diagonal movement costs x1.4 since i didn't know any better and i never ever thought that diagonal roguelike movement is usually the same as moving to adjacent cells.

Ex

  • IRC Communications Delegate
  • Rogueliker
  • ***
  • Posts: 313
  • Karma: +0/-0
    • View Profile
Re: Movement and Circular FOV
« Reply #3 on: August 19, 2009, 08:35:16 PM »
I've FOV working in my game, but right now it's square. I think circular FOV looks better, which is probably a good enough reason, but does it make sense? If moving diagonally takes just as much time as moving horizontally or vertically, it must be the same distance. If they are, then it stands to reason that the player should be able to see just as far in one direction as another. I could make diagonal movement more costly. Any opinions on this?

It has to do with the math involved. Four steps to the left is closer than four steps diagonally, even though they take the same number of key presses. This is because you're moving along X and Y by 1 when moving diagonally, instead of just X by 1. For instance, the distance between 0,0 and 1,0 is 1, while the distance between 0,0 and 1,1 is as mentioned by an earlier poster (roughly) 1.4

You can find the distance to something by taking the square root of the sum of the squares of the difference between two points:

X = X2 - X1;
Y = Y2 - Y1;
Distance = sqrt( (X*X) + (Y*Y) );
« Last Edit: August 19, 2009, 08:37:06 PM by Elig »

george

  • Rogueliker
  • ***
  • Posts: 201
  • Karma: +1/-1
    • View Profile
    • Email
Re: Movement and Circular FOV
« Reply #4 on: August 19, 2009, 11:32:57 PM »
I think it depends on what it means to make diagonal movement more costly. If it just decrements a stamina stat more quickly that seems more cumbersome than interesting to me...however if you're using a priority queue speed system or something like that it could be more tactically interesting to make diagonals more expensive. However keep in mind that there's all sort of 'unrealistic' things about cell-based maps, so I wouldn't just design something a certain way because it makes sense 'realistically'.

For the record, in what I'm working on I don't have diagonal movement, but I do have circular fov where diagonals are equal to orthogonals.  ;)

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Movement and Circular FOV
« Reply #5 on: August 20, 2009, 12:09:06 AM »
This comes up from time to time, initially for me I though 1.414 times more movement points was logical for diagonal movement, I cant remember why I switched back to 1.  Roguelike tradition I guess.  It didn't really effect gameplay at all, because the enemy had the same movement, there was no real difference, other than it took longer to move out of the flightpath of incoming projectiles.

However all my A* algorithm uses the correct calculations, as this makes enemy movement "look" more logical.

Hex games are the most logical, they just look stupid in ascii, and are hard to use logical movement keys.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Nahjor

  • Newcomer
  • Posts: 33
  • Karma: +0/-0
    • View Profile
    • Email
Re: Movement and Circular FOV
« Reply #6 on: August 20, 2009, 05:50:57 AM »
The big thing for me on this point is that it's very counterintuitive that diagonal steps would take more of anything. Yes, if you sit down and think about it, it makes sense...but when you have a convention in the majority of games (and not just roguelikes, but anything with a discretely divided map) that diagonal steps are equivalent to orthogonal ones, doing anything different violates the user's expectation.

As far as the FoV issue goes, my project draws squares for radius-based things. It looks a bit weird, but it makes it a lot easier to tell exactly where a fireball's explosion will cover, for example. This is also counterintuitive, but (IMO) less so than shaving the corners off areas for appearance's sake, and a lot less than diagonal steps taking more of a resource.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Movement and Circular FOV
« Reply #7 on: August 20, 2009, 10:29:22 AM »
IMO there is no problem with hex in ASCII: use a font where character's height is bigger than their width (standard ASCII VGA font has this property); and the six neighbors of the cell represented by (x,y) on screen are represented by (x±2,y), (x±1, y±1). (Half of the screen space remains unused.) Use 1,4,7,9,6,3 on numpad for movement. Maybe some small attunement is required, but it does not look stupid nor illogical for me. (The hex variant of hjkl is even more logical than the octagonal one.) Of course, there are problems if you want to have rectangular rooms, or whatever.

Also, you could consider using 1.5 for the multiplier rather than 1.4 (Rebel Star used 1.5). This allows easier tactical planning. Also note that POWDER has no diagonal movement.

I don't understand the comment about taking longer to move out of the flightpath of incoming missiles... obviously missile range should be also reduced in diagonal direction.

justinhoffman

  • Newcomer
  • Posts: 33
  • Karma: +0/-0
    • View Profile
    • Email
Re: Movement and Circular FOV
« Reply #8 on: August 26, 2009, 10:40:45 PM »
Has anyone made a far sighted roguelike with donut shaped FoV?

It would be extra challenging until you can find some bifocals.

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Movement and Circular FOV
« Reply #9 on: August 29, 2009, 08:05:09 PM »
That's a pretty original idea.  Maybe there could be different character types with different LoS, like one that can only see tiles exactly horizontal and vertical to them and such.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Movement and Circular FOV
« Reply #10 on: August 31, 2009, 10:19:31 PM »
Another idea is to have a roguelike with lots of mirrors (and maybe portals), which would affect field of vision, there could be also some special effects, for example:

- cockatrice can use their gaze to attack through mirrors, but missing the target and hitting the mirror beyond would be dangerous to them

- vampires are invisible through mirrors

- some scrolls need to be read through mirrors (or, have another effect when read through a mirror)

- special mirrors in which you don't see yourself, allowing passing through to the mirror world

- invisible monsters visible only via mirrors

- magic mirrors which reveal additional truths

etc

justinhoffman

  • Newcomer
  • Posts: 33
  • Karma: +0/-0
    • View Profile
    • Email
Re: Movement and Circular FOV
« Reply #11 on: September 02, 2009, 05:53:38 PM »
Another idea is to have a roguelike with lots of mirrors (and maybe portals), which would affect field of vision, there could be also some special effects, for example:

Did you see the youtube video of ascii portal?  Now that is some sweet ascii 2d FOV.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Movement and Circular FOV
« Reply #12 on: September 03, 2009, 01:41:02 PM »
Nice (although it just seems to be an ASCII Portal, not a roguelike).