Re: Modeling events that occur in a game world



On 24 Apr 2007 19:44:45 -0700, Aaron J. M. wrote:

On Apr 23, 5:20 am, "Dmitry A. Kazakov" <mail...@xxxxxxxxxxxxxxxxx>
wrote:
This is why the event abstraction is not that good for more or less
elaborated physics. It would make the design of objects way too complex.
When an object is thrown, it is not a collaboration between it and the
thrower. It just flies, it need not to know what has thrown it.

Yes, the actual motion of a thrown creature needs no collaboration with the
thrower or anything like that. But what about the AI controlling the creature?
To be an effective AI, it needs to
1) Tell that the creature was thrown in the first place.
2) Tell who the thrower was, so that it knows who to retaliate against.

I don't think so. The AI should know if there is an aggressive action
against the creature it controls. Whether throwing is considered aggressive
depends on many factors. I suppose, a high mage should be allowed to throw
allied gnomes at his opponents without risking of being retaliated. But he
will be punished if he tried to do that with a dragon.

[...]
The missing link has to do with AIs knowing things that have happened to their own
Creatures or to any other Creatures they'd be interested in. This information does
not have to do with Creature actions like attacks themselves, but with AIs being
able to infer what has happened and who were involved so that they know who to
blame.

The awareness of actions should IMO come from the map. So the AI should
read from the map: there is an accelerating force being applied to my
creature. So the physics starts to work first. If AI considers this as a
damage (some creatures might actually enjoy being propelled), then it
should scan the neighborhood for the cause of that unfortunate event. In
other words it should create a hypothesis of what has happened. That can be
simplified as building a list of nearby creatures with some factors of
confidence in their aggressive/friendly behavior. Also the creature
possesses knowledge (memory) about some of these creatures (confidence
factors of My_Ally, Stronger_Than_Me, Tastes_Good etc). This knowledge base
should definitely change with the creature's experience. Further the
creature has self-awareness, i.e. the knowledge of short-term tactic
decisions ("I'll kill that") and long-term strategic decisions ("We are on
our way to X") made by the AI before. This all is the input data the AI
uses to make its move.

(Events can be used as shortcuts in this admittedly complex process. But
they are like black magic. I would use them sparely for only very
high-level things.)

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: Projectiles have AI
    ... Anything that can be thrown through the air. ... before any other creature could react. ... to stumble across the path of the projectile before it arrives at its ... Ie Arrows of homeing, shoot around corners, homing\tracking spells. ...
    (rec.games.roguelike.development)
  • Re: Projectiles have AI
    ... fired) will be handled as a creature. ... Anything that can be thrown through the air. ... still need special code for movement (you still have to code ...
    (rec.games.roguelike.development)
  • Re: OT:I wont criticise the BBC ever again...
    ... >> Poor bloke, they've already thrown him in with a fucking horrible ... >> creature on reality TV once.. ...
    (uk.rec.motorcycles)