Re: Perception and AI (and log messages)
- From: Gerry Quinn <gerryq@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 3 May 2007 16:21:15 +0100
In article <slrnf3jlpt.rt2.news@xxxxxxxxxxxxxxxxxxxx>,
news@xxxxxxxxxxxx says...
At Thu, 3 May 2007 11:45:52 +0100,
Gerry Quinn wrote:
Then your monsters are stateless and their behavior is rather simple.
But more than complex enough for most roguelikes, and easy for the
player to interpret and exploit. Exactly what is required.
I dare to say that just following the player's position is more than
complex enough for most roguelikes. All it requires for the AI to know
is the position of the monster and position of the player. I fail to see
how introducing FOV makes it simplier or easier for the player to
interpret and exploit.
What I mean is that stateless AI is easier to understand and exploit,
because the player knows everything that can affect the monster's
actions (at least if it's in field of view).
If the game runs too slowly, one could do that. Probably most
programmers would choose it anyway. But the FOV method comes to the
same thing, so why worry - it should be easy to change afterwards if
necessary.
It's not about the speed. It's about doing a lot of work up front so that
you have... the same amount of work to do later. This kind of "collect
all information that could be ever needed and wrap it into neat format,
so that the AI writer has a hard time interpreting it" approach, that
separates the AI from the dungeon and the game as if monsters were just
other players, not integral part of the dungoen.
Well, it may be less efficient, but I don't think that there is much
difference in coding:
// Version 1:
Create FOV object based on dungeon, monster position, view radius
Iterate over squares in FOV object:
If square is visible
If interesting object on square
Add square to list
//Version 2:
Iterate over square region of dungeon
If square is within view radius
If interesting object on square
If square is in LOS of monster
Add square to list
(My own monsters just go by distance - they can detect enemies up to
their sight distance irrespective of walls etc., and they have no
interest in anything else. LOS is taken into account when it comes to
waking, though, there is only 1/3 the chance of a monster waking up if
a player is at a given distance but out of LOS.)
Why are you arguing the use of approach you have shun yourself then? Don't
you think it's a little unfair to all others who read it and may believe?
Because clearly the OP is interested in using LOS for monsters, which
is a legitimate approach, even though I have chosen to use it only
minimally (it only affects stealth).
- Gerry Quinn
.
- Follow-Ups:
- Re: Perception and AI (and log messages)
- From: Radomir 'The Sheep' Dopieralski
- Re: Perception and AI (and log messages)
- References:
- Perception and AI (and log messages)
- From: Aaron J. M.
- Re: Perception and AI (and log messages)
- From: Radomir 'The Sheep' Dopieralski
- Re: Perception and AI (and log messages)
- From: Jakub Debski
- Re: Perception and AI (and log messages)
- From: Radomir 'The Sheep' Dopieralski
- Re: Perception and AI (and log messages)
- From: Jakub Debski
- Re: Perception and AI (and log messages)
- From: Radomir 'The Sheep' Dopieralski
- Re: Perception and AI (and log messages)
- From: Gerry Quinn
- Re: Perception and AI (and log messages)
- From: Radomir 'The Sheep' Dopieralski
- Perception and AI (and log messages)
- Prev by Date: Re: Perception and AI (and log messages)
- Next by Date: Re: Perception and AI (and log messages)
- Previous by thread: Re: Perception and AI (and log messages)
- Next by thread: Re: Perception and AI (and log messages)
- Index(es):
Relevant Pages
|
Loading