Entity

From Blood Wiki
Revision as of 22:26, 22 July 2012 by VorteX (Talk | contribs)

Jump to: navigation, search

Entity (edict, object) - any object in game world. Players, Monsters, Items etc. are entities.

There is 3 types of game entities, depends on what programs they exists:

  • Game entity
    • Server entity (actual game entity, get saved to savegames)
    • Client entity (networked game entity on a client)
    • Menu entity (exists only in menu program which is a separated from a client because client program get unloaded when level changes)
  • Network entity - legacy engine-based networking (not using client-side progs)
  • Render entity - a Network/Client entity that is sent to render.

Game entity structure

Each game entity have:

  • entity number (index in global entity storage)
  • fields (or keys) - all entity properties.

Entity behavior is defined by it's fields.

Example of entity fields:

origin - position or entity in the world space
health - health of entity
classname - entity class name
th_die - internal game field, a game function to call when monster dies
_next - system field used by entity chain routines
_ls - q3map2 field, sets scale of lightmaps to be generated for entity surfaces

In QuakeC, all entities shares the same fieldset. But on different entity classes, same fields can have different functionality.

Fields classification

  • Common field - field of entity that can be set in level editor (such as origin)
  • Gamecode field - this one is being set by gamecode, not acessible in level editor (th_die is an example)
  • Non-Saved field - not saved to a savegame field, this fields always prefixed by _ (_next field).
  • Compiler-only field - this field dont exist in the game logic and only used by Q3map2 to guide compilation of map (_ls field).
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox