view range - CSBwin

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

view range - CSBwin

Post by Adamo »

I just read Linfas` topic from http://www.dungeon-master.com/forum/vie ... hp?t=26553
Linfas wrote:
does a monster surrounded by real walls still can "see" party (...) ?
I`m interested in that problem too. In original engine on word 14 there are two 0-15 values: sightrange and awareness. Awareness decreases in darkness and increases in light.

From ADGE readme:
Sightrange: How far the monster can see, used in AI calculations.
-Unused1: Unused/unknown
-Awareness: How far the monster can automatically detect the player and persue them.
I guess while a real wall between player and monster affects the sightrange (= monster does see only a wall; not a party over a wall), the awareness doesn`t depend on an obstacles between them both (= monster "senses" the party over the wall if awareness is >1)?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

BTW, Rain, maybe shouldn`t it be
Can see in darkness: The monster's visibility is unaffected by the light level of the dungeon (In darkness, monster's SIGHTRANGE is normally lowered)
in ADGE raedme, instead of
Can see in darkness: The monster's visibility is unaffected by the light level of the dungeon (In darkness, monster's awareness is normally lowered)
in ADGE readme? That seems more sensible in game mechanisms to lower SIGHTRANGE in the darkness. Is it really monster`s AWARENESS lowered in the dark..??
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

from flashchat - Joramund claims that
I think the awareness and sight refer to two different algorithm : one that
just takes all tiles within range and see if the party is there (with some modification to "reactivity"
depending on light etc.
and one that recursively goes through the "open tiles" (not walls) to a given range, to follow the
party.]
[Parallax] 10:46 pm: Thenshouldn't they both be reduced in darkness?
[Joramund] 10:47 pm: well they could, but since most of the time they give the same result, I
suppose that one must be affected and not the other.
[Joramund] 10:47 pm: The results are very different only for long range.
[Joramund] 10:48 pm: because then the "sees all" is much more efficient than the tracker one.
(...)tracker algorithm was less efficient in a twisty and snaky
maze
now THAT clears it all ! what d`you think about it?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

Comparition between SIGHTRANGE and AWARENESS in original game:

Code: Select all

Scorpion              S 3  > A 1 
Slime Devil           S 2  > A 1 
Giggler               S 6  > A 3 
Flying Eye            S 10 > A 2 
Hellhound             S 4  < A 5  * 
Ruster                S 2  = A 2 
Screamer              S 1  = A 1 
Rock Pile             S 3  < A 4  * 
Rive               di S 3  < A 4  * 
Stone Golem           S 3  > A 0 
Mummy              d  S 4  > A 2 
Black Flame        di S 4  > A 3 
Skeleton           d  S 3  > A 0 
Coualt             d  S 3  = A 3 
Vexirk                S 5  > A 3 
Worm                  S 1  < A 10 * 
Antman                S 3  = A 3 
Muncher               S 2  < A 4  * 
Deth Knight           S 5  > A 0 
Zytaz                 S 8  > A 2 
Water Elemental    d  S 1  < A 3  * 
Oitu                  S 2  < A 5  * 
Demon              d  S 4  > A 3 
Lord Chaos         di S 9  > A 3 
Dragon                S 5  < A 6  * 
Lord Order         di S 9  > A 3 
Grey Lord          di S 9  > A 3 

S - sightrange
A - awareness
d - can see in darkness
i - can see invicible
* - Monster has awareness factor higher than sightrange
take a look at Stone Golem; Sightrange = 3, awareness = 0. What does it mean: Stone Golem sees you on 3 tiles when he`s turned in front of you (except a situation when there`s a wall between monster and party), but doesn`t "sense" you when you`re just behind him? Or golem sees you at 3 tiles and no more, no matter the light (because light/dark affects only the AWARENESS, not the SIGHTRANGE as it is written in ADGE readme)?
[Leon79] 11:38 pm: I think that means stone golem only attacks with line of sight
[Lunever] 11:43 pm: I suspect SIGHTRANGE is the minimum perception range even in the dark
*****************************

<EDIT>: hmm. If light changes really affects the SIGHTRANGE I would say that it is monster`s sense of vision and AWARENESS is his sense of hearing (*); that way Stone Golem (S3,A0) sees you from 3 tiles, but doesn`t hear you at all); Worm (S1,A10) sees you only from 1 tile, but hears you from 10 tiles. Flying Eye (S10,A2) has good sense of vision, but doesn`t hear you well and Screamer (S1,A1) hasn`t very developed senses. Lords (Chaos, Order and Grey) - all of them has the same factors (S9,A3) sees you from 9 tiles (no matter of the light factor, because they have "can see in darkness" falg set), but hears you from 3 tiles only... The monsters marked by an asteriks on the code table has better sense of hearing than their sense of vision. It`s just my theory anyway.
If so, maybe the "lost" Word14 Unknown1 factor would be the monster`s sense of smell (characters smells so much that monsters with that factor senses party no matter they moves or not)? ;)

(*) - hearing party moves just like you hear creature`s moves in Amiga version of DM, no matter if you`re behind the wall or not. So the wall makes viewing you by a monster impossible, but obstacles such as walls doesn`t affect on hearing you (in real life, they DOES).
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

interesting. Here you see that the guys who made dm put much brains into it. Stone Golems have no need to hear party, it all is very well designed .
Worms use tremorsense (it feels when the earth shakes slightly(footsteps))
and don''t see very well.


Word14 Unknown factor could be :
monster is feared and forgets sight, but heightens listening trying to get away from the party.
monster is aggro(aggressive/hurt) and well, changes sth..
enough speculation from me.. ;)

detect the player and persue them /
should be written : pursue, like in the game trivial pursuit

it should read invisible instead of invincible.
invincible means cannot be killed , visible is if sth. can be seen(vision)

You could add the speed of the monster to the table above.
Together this table is nice to have when designing monsters.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

I`m still not sure what AWARENESS does! These are only my suspects- maybe the awareness has different function than I described!
It would be extremally hard to figure out what unknown function EXACTLY do in practice (by changing factor values in ADGE and comparing monster trace each time with different value). But that would require tens (or hundreds!) of tries with each value (0-15).

Here`s how to do it:
Make a big, say, 32x32 empty level with some walls areas. Make a startpoint and put one monster somewhere (there should be only 1 active monster in the whole game). Set the unknown value to minimum. Turn on the game. Look at monster behaviour on DSA trace. Then change the value to its maximum. Turn on the game again, wait a moment and compare next monster trace with previous one. If there were some visible changes in monster behaviour... we won! But monster movements depends mainly on random factors, so it would require a lot of repeticions!

EDIT: oh, BTW, Paul made a project to understand monster`s AI. This is described here: http://www.dianneandpaul.net/CSBwin/doc ... terAI.html
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
mikko
Craftsman
Posts: 102
Joined: Sun Jan 15, 2006 2:42 pm
Location: Helsinki, Finland

Post by mikko »

Other way to find out what these values do, would be to exhaustively go through the CBSWin code and see what they are used for there.. :shock: Don't know which would be easier, but the source should give a definite answer, while trying it out would merely suggest something..
User avatar
Lunever
Grand Druid
Posts: 2712
Joined: Thu Feb 14, 2002 4:47 pm

Post by Lunever »

Hmm, isn't it possible, that the value that is not modified by light represents the basic perception range (the monster always perceives the party within that range), and the value modified by light is added to the basic perception range? That'd mean you can sneak past a screamer in the dark at 2 tiles distance (lucky you at least the screamer is well visible in the dark due to its luminescence), but you can't do so in light.

As far as I remember screamers do perceive a light carrying party at 2 tiles distance (except in a previous RTC version where George was still experimenting with the view ranges), so Adamo's comparison between his "S" and "A" values, like S1=A1 for the screamer, might not be the proper approach there.
Parting is all we know from Heaven, and all we need of hell.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

description from encyclopedia:
Sight range: Number of tiles between creature and party needed to see the player. This value is modified by the light value.
Awareness: Number of tiles between creature and party needed to "turn" towards the player, perhaps to shoot a projectile.
so the sight range is modified by the light value, if encyclopedia is right!

http://dmweb.free.fr/?q=node/783
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Lunever
Grand Druid
Posts: 2712
Joined: Thu Feb 14, 2002 4:47 pm

Post by Lunever »

Right, so on contrary to RTC (as far as I know at least), FTL monsters would have a sight direction then. The description from the Encyclopaedia sounds reasonable, I hope RTC will have that sophisticated monster perception too in some future release.
Parting is all we know from Heaven, and all we need of hell.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”