How does an Engine like Source process entities?
Posted
by
Júlio Souza
on Game Development
See other posts from Game Development
or by Júlio Souza
Published on 2011-06-23T03:55:03Z
Indexed on
2011/06/23
8:30 UTC
Read the original article
Hit count: 377
[background information]
On the Source engine (and it's antecessor, goldsrc, quake's) the game objects are divided on two types, world and entities. The world is the map geometry and the entities are players, particles, sounds, scores, etc (for the Source Engine).
Every entity has a think function, which do all the logic for that entity.
So, if everything that needs to be processed comes from a base class with the think function, the game engine could store everything on a list and, on every frame, loop through it and call that function.
On a first look, this idea is reasonable, but it can take too much resources, if the game has a lot of entities..
[end of background information]
So, how does a engine like Source take care (process, update, draw, etc) of the game objects?
© Game Development or respective owner