![]() |
#1 |
Prophet
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,025
![]() |
bug in head
I've noticed a bug with lighting, where, if I'm using a radius 2 light (like a torch or a lantern) and am standing in a room where there are walls on 3 sides of me, I cannot see the corners next to me. This is extremely obvious in checkerboard rooms, where I can't see anything on any other square.
In trying to debug it, I created a mage and used created doors and there's a second bug where create doors does not create doors diagonally next to you, only on the 4 squares adjacent. What's going on? |
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Mar 2008
Posts: 2,712
![]() |
I haven't tried head, but there was a trac ticket saying that the distance function was changed. That's dangerous on balls. It used to be that distance((0,0),(1,2)) <= 2 but with a better distance function it is not. I'd guess that is the problem. I think I once thought the fix was to compare distance to r + 0,5 for a radius r ball but I don't remember for sure. There will also be questions about damage reduction. Before this change, that damage was divided by 3. Should that behavior remain or should it divide by 1 + \sqrt{5} ?
These things aren't helpful with integer arithmetic, unless you do things properly and compare squared distances rather than computed distances. You can compare dist^2 <= r^2 + r using integers. |
![]() |
![]() |
![]() |
#3 | |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 41
Posts: 1,516
![]() |
Quote:
![]() I've had a more accurate distance algorithm for awhile, and I committed it this weekend. I noticed that bug and spent about 3-4 hours yesterday trying to fix it before deciding that: 1. I don't understand all the crazy details of update_view() et al. 2. I hate update_view() et al. So I think I'm just going to roll this back to fix HEAD. The one silver lining (for me anyway) was that this motivated me to actually write a permissive FOV algorithm in C along with a tester harness for other FOV implementations. Last edited by d_m; July 6, 2010 at 13:59. |
|
![]() |
![]() |
![]() |
#5 |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
That and the supporting functions can be pretty painful. When I did the 4gai upgrade in NPP I got a decent understanding of it. Feel free to fire any questions my way if you all have to play around with it any more.
|
![]() |
![]() |
![]() |
#6 | |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 41
Posts: 1,516
![]() |
Quote:
![]() Do you ever stop by #angband-dev on IRC? |
|
![]() |
![]() |
![]() |
#7 | |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 41
Posts: 1,516
![]() |
Quote:
I have been reading about FOV and am curious how to try to make asymmetric LOS play better. I still like symmetric LOS more, but that may be for reasons of implementation. It seems like with a FOV and reverse FOV calculated the monster AI could (in principle) play a lot smarter, and the symmetric/asymmetric distinction becomes less important. |
|
![]() |
![]() |
![]() |
#8 | |||||
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
Quote:
With 4gai, each monster has a desired distance they want to be from the player. Spellcasters want to be further back. Group monsters prefer to stay in hiding until the player is out in the open or otherwise vulnerable to attack. LOS only affects the monsters decision to move forward or attack. Quote:
The monsters don't remember what they did in previous rounds or have a recorded plan of attack. They re-evaluate every turn as the player moves or gets wounded and/or heals. Quote:
With 4gai, each monster has a desired distance they want to be from the player. Spellcasters want to be further back. Group monsters prefer to stay in hiding until the player is out in the open or otherwise vulnerable to attack. LOS only affects the monsters decision to move forward or attack. Quote:
The monsters don't remember what they did in previous rounds or have a recorded plan of attack. They re-evaluate every turn as the player moves or gets wounded and/or heals. It is tricky, because if the decision making is too complicated, the monsters tend to start wandering around in circles rather than fighting if they cnage their minds too often about what they want to do. I did add some code for monsters to fight back against some of the standard Angband tactics, such as the pillar dance or the hack-n-back. Monsters who get hit and then find the player out of line of sight during thier attack will try to fire back ball spells near the player in hopes of causing splash damage. Monsters who don't have ball spells are much more likely to do something else indtead of direct combat with the player, like summon, heal, phase door away. Quote:
I don't go to Angband IRC at the moment, because right now I am playing catchup and trying to get NPP current with the latest version of Angband. I will probably start going on there soon, once I get everything working in NPP again. |
|||||
![]() |
![]() |
![]() |
#9 |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
|
![]() |
![]() |
![]() |
#10 | |
Prophet
Join Date: Mar 2008
Posts: 2,712
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Targeting change in HEAD | d_m | Vanilla | 11 | November 22, 2009 00:04 |
head of Vecna | PowerDiver | Idle chatter | 3 | September 7, 2009 18:46 |
improved GCU code in HEAD | d_m | Vanilla | 23 | August 19, 2009 19:59 |
targeting differences between 3.0.9b and HEAD | d_m | Vanilla | 4 | December 21, 2008 22:22 |
DaJAngband -I'm in over my head | will_asher | Idle chatter | 15 | February 27, 2008 09:04 |