[quake2] Quake 2 'entities' help
brendanburns at comcast.net
Tue Feb 8 08:11:25 EST 2005
All of the entities have a "think" slot that contains a function. The
"think" function is called by the game engine every time through the
game loop. It makes them do whatever it is they're supposed to do. It
also has an animation sequence attached to it that makes the characters
animate. Each entity actually has multiple functions that it uses as
the "think" function depending on its state (and the state of the game)
As an example, if you look in m_infantry.c you'll see functions like
"run" "pain" etc which implement those actions. The AI is basically a
deterministic finite automata (you may have seen that in a computer
science course sometime).
hope that helps.
On Feb 7, 2005, at 5:27 AM, Asfand Yar Qazi wrote:
> Hi again,
> I was wondering if anybody knew of any sites where I could get some
> tutorials or overview into the working of Quake 2 'entities'.
> What I'm really interested in is how the game allows these entities to
> perform their own custom operations, and then integrates these
> operations into the game world itself. E.g. a monster, a rocket and a
> health pack are all entities and share some code, but also have custom
> code for themselves. How is this custom code and common code linked?
> Asfand Yar
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2377 bytes
Desc: not available
More information about the quake2