Entity

From Blood Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
'''Entity''' (edict, object) - any object in game world. Players, Monsters, Items etc. are entities.
 
'''Entity''' (edict, object) - any object in game world. Players, Monsters, Items etc. are entities.
  
In Blood Omnicide, each entity have entity number (index in global entity storage), entity class (a string storing entity class name) and fields that store all other entity properties.
+
=== Entity types ===
  
In QuakeC, all entities shares the same fieldset. But on different entity classes, same fields can have different functionality.
+
There is 3 types of game entities, depends on what programs they exists:
  
There is 3 types of entities in the game code, 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 (exists on server)
+
=== Game entity structure ===
* Client entity (exists on a client)
+
 
* Menu entity (exists on menu program which is a separated from a client because client program get unloaded when level changes)
+
Each game entity have:
 +
* entity number (index in global entity storage)
 +
* entity class (code-drived behavior)
 +
* fields (or keys) - entity properties.
 +
 
 +
Example of entity fields:
 +
health - health of entity
 +
classname - entity class name
 +
_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.
  
Theres is also special entity types managed by Darkplaces Engine:
+
==== Fields classification ====
  
* Network Entity - legacy networking (not using client side progs)
+
* Common field - field of entity that can be set in level editor (such as '''origin''')
* Render Entity - a Network/Client entity that is sent to render.
+
* Gamecode field - this one is being set by gamecode, not acessible in level editor
 +
* Non-Saved field - not saved to a savegame filed, this fields always prefixed by _.
 +
* Compiler-only field - this field dont exist in the game logic and only used by Q3map2 to guide compilation of map.
  
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Revision as of 22:22, 22 July 2012

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

Entity types

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)
  • entity class (code-drived behavior)
  • fields (or keys) - entity properties.

Example of entity fields:

health - health of entity
classname - entity class name
_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
  • Non-Saved field - not saved to a savegame filed, this fields always prefixed by _.
  • Compiler-only field - this field dont exist in the game logic and only used by Q3map2 to guide compilation of map.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox