Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old January 15, 2010, 18:10   #1
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
bugblatter LOS

I know how I would like to do symmetric LOS, but I fear it is too big an undertaking ever to go after directly. I think it will be necessary to have at least one, and probably several, intermediate steps. I would like to suggest a first step with some obvious problems.

The basic idea is to keep the current system of sending a bolt from the player to the monster, and use that to define LOS, and then define the path from the monster to the player to be the same, just in reverse order.

All LOS is square to square, so if you can see a wall you can target a monster in it.

Code:
#####
 M   
## ##
##@##
Above, @ and M see each other, and fire bolts through the gap.
Below, @ and M do *not* see each other. This proposal is not fully symmetric.
Code:
#####
 @   
## ##
##M##
This also means
Code:
#####
#   G
#   #
#   #
#  @#
#####
the @ cannot see the G above, and cannot see the wall it is in either.
Below, the @ can see and target the G, and the G can target the @ too.
Code:
#####
#   G
#   #
#  @#
#   #
#####
This is a suggested interim approach, hopefully to be further improved at some future point in some possibly alternate universe, but reality is that sometimes "interim" fixes last effectively forever despite one's best intentions.

I don't think it would be helpful to suggest modifications. We had that thread already. I chose this due to hoped-for ease of implementation, which is the key to intermediate steps. Please at least give thumbs up or thumbs down *before* digressing.

Would this be playable? Would it be an improvement?
PowerDiver is offline   Reply With Quote
Old January 15, 2010, 18:47   #2
Marble Dice
Swordsman
 
Join Date: Jun 2008
Location: Columbia, MO. USA
Posts: 405
Marble Dice is on a distinguished road
I don't like that it isn't symmetric wrt player vs monster. It would possibly train people to make mistakes - if they assume two-way visibility in all knight's moves because they have it when they are standing on the long side, they might assume there is no enemy around a corner when they are standing on the short side, which might not be the case.

Specifically, this would be an issue with death molds around corners, wouldn't it?

Code:
##m##
##.##
.@.##
#####
Moving north-east would be a mistake, but @ doesn't know that because @ and the m cannot see each other.

DIGRESSION: I think DFOV is still my favorite alternative LOS system.
Marble Dice is offline   Reply With Quote
Old January 15, 2010, 19:14   #3
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
That's why running uses corners. Players would not have to adapt to corners or T intersections, because that is the current behavior.

DFOV isn't feasible at this time IMO. It is beyond what I consider a reasonable chunk size from an implementation perspective. Also, I think players would have to adapt to it more than to this one, so you shouldn't do it unless you are positive that will be the final choice.

Anyway, do I understand correctly that you are thumbs down?
PowerDiver is offline   Reply With Quote
Old January 15, 2010, 19:23   #4
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,972
Derakon is on a distinguished road
I also think that it's a bad idea to have LOS depend on the player. It makes intuitive sense that monsters are identical to the player, except AI-controlled; thus, if the player in position A can shoot a monster in position B, then a monster in position A should be able to shoot the player in position B.

Some variants (c.f. UnAngband) have LOS algorithms where the hockeystick lets you see, but not shoot, your target. Of course, I suspect that trick shots still break that, but given the nature of raycasting in a tile-based system, I frankly don't see how you can do away with trick shots.
Derakon is offline   Reply With Quote
Old January 15, 2010, 19:26   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Cautious thumbs up from me, but I'd like to know what your preferred symmetric implementation is before taking your word for it being too big to do in one go. My view is that any LOS change is going to be far-reaching and difficult, so I'd MUCH rather we did the whole thing in one version.
Magnate is offline   Reply With Quote
Old January 15, 2010, 19:32   #6
Marble Dice
Swordsman
 
Join Date: Jun 2008
Location: Columbia, MO. USA
Posts: 405
Marble Dice is on a distinguished road
Quote:
Originally Posted by PowerDiver View Post
That's why running uses corners. Players would not have to adapt to corners or T intersections, because that is the current behavior.

DFOV isn't feasible at this time IMO. It is beyond what I consider a reasonable chunk size from an implementation perspective. Also, I think players would have to adapt to it more than to this one, so you shouldn't do it unless you are positive that will be the final choice.

Anyway, do I understand correctly that you are thumbs down?
I agree with Magnate that pretty much any change to LOS will be far-reaching and difficult. Thus, I think any problems with the LOS system should be fixed in one more or less one go. At the very least, all intermediate steps to the final goal should be taken in the span of one release. That's why I'd rather fix all the problems - symmetry, seeing around corners, projectability, etc at the same time.

I would say I'm a hesitant thumbs down. I could be won over, but I think such a system wouldn't fix enough of the current problems (and without introducing its own idiosyncrasies) to be worthwhile.
Marble Dice is offline   Reply With Quote
Old January 15, 2010, 20:15   #7
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
I have my own model that is somewhat equivalent to DFOV, but based on center-to-center instead of diamond-to-diamond and it would require changing most rooms. I wouldn't be opposed to DFOV per se. I just think mine is better. Someone called it like dwarf fortress in the other thread, at least regarding their understanding of what I could manage to convey of my understanding at the time.

I just think that rearchitecting poorly written code is really hard. This suggestion is supposed to be the minimal change to allow all new hooks to be implemented and tested in a familiar format where bugs will be apparent, and also to eliminate hockeysticks. If someone could suggest even less of a change, I'd be even happier. Bigger change IMO is insane.

Once the hooks are in place and well tested, then one could experiment with multiple different LOS/POV stuff, but I really think the first change should be as minimal as possible.

I might or might not be willing to implement this. I would not consider implementing DFOV at this time, and would suggest to others that it would be a mistake to do so.

There is also the question of no hockeysticks. I don't think most people realize how often they abuse those. Some playtesting without hockeysticks may change viewpoints about whether DFOV is in fact a good idea.
PowerDiver is offline   Reply With Quote
Old January 15, 2010, 20:24   #8
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
I don't love this proposal. I think I prefer your suggestion of removing hockey-sticks if we're going to make small changes to the current scheme.

My (potentially bad) plan was to try to refactor the existing LOS implementation(s) into a sensible and modular structure, which would allow us to test (or potentially even plug-in) various LOS implementations and try them out. I agree with you that play testing will be difficult.

The biggest problem right now is that the code uses many different LOS-esque calculations that are only loosely related.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old January 15, 2010, 20:35   #9
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by d_m View Post
I don't love this proposal. I think I prefer your suggestion of removing hockey-sticks if we're going to make small changes to the current scheme.

My (potentially bad) plan was to try to refactor the existing LOS implementation(s) into a sensible and modular structure, which would allow us to test (or potentially even plug-in) various LOS implementations and try them out. I agree with you that play testing will be difficult.

The biggest problem right now is that the code uses many different LOS-esque calculations that are only loosely related.
Yes. This is the big problem IMO. I think the solution is to rewrite the code to be much more coherent, improving LOS as we go. So it is critical that we have an agreed end goal - personally I'd be very keen for something like Eddie's centre-to-centre version of DFOV (which IMO is unnecessarily "realistic"). I disagree that big change is insane, and I disagree with Eddie's implied assertion that bad code should be left alone and worked around. We should aim for the big change, of course doing it in manageable chunks as dictated by the necessary code refactoring.

Of course this is easy for me to say: I have carefully avoided taking any LOS-related tickets!
Magnate is offline   Reply With Quote
Old January 15, 2010, 21:00   #10
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 45
Posts: 872
andrewdoull is on a distinguished road
The other approach is to realize that asymmetrical LOS is fine and treat the problems that it creates as AI problems instead of necessarily having to radically redesign the LOS code.

Consider a game play related case where the player can target a grid that will hit a monster with a ball spell, when the monster is not capable of doing so in return. You'll always get this issue regardless of the LOS algorithm used - because it is genuinely asymmetrical.

While I'm happy with the Unangband LOS code (which additionally separates LOS from LOF - a feature no one has considered), it has taken a long time to get out all the quirks. It is btw mostly based on the excellent work done in the Sangband LOS code.

I understand there's a lot of LOS discussion on rec.games.roguelike.development which seems to have compared a variety of algorithms and decided that there is a superior choice - it might be worth linking to and summarizing that discussion here.

Andrew
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can of Worms - LOS / Targeting / Trick shots RogerN Variants 6 October 9, 2009 20:43
LOS/FOV/projections in NPP/Sangband half Development 1 July 21, 2009 23:49
targetting and LOS PowerDiver Vanilla 187 July 6, 2009 00:02
Targetting and LOS discussion wiki page PaulBlay Vanilla 60 June 28, 2009 03:42
feature request - disturb on reverse LOS PowerDiver Vanilla 2 May 18, 2009 07:46


All times are GMT +1. The time now is 01:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.