Entity
From Blood Wiki
(Difference between revisions)
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. | ||
− | + | === 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. | ||
[[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.