Editing Entity

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
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.
  
== Game entity ==
+
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.
  
Each game entity have unique number (a position in entities array) and set of fields. Set of fields are shared between all entities, but their usage is based on entity class and subclass functions. It means if "health" field is defined, any entity can access it, but based on entity class, it can have different meaning. There is system fields used by engine routines (spawnflags, movetype).
+
In QuakeC, all entities shares the same fieldset. But on different entity classes, same fields can have different functionality.
  
Entity fields can be one of 5 types:
+
There is 3 types of entities in the game code, depends on what programs they exists:
* float - 32bit float value
+
* vector - 3-dimensional vector (3 floats)
+
* entity - pointer to another entity (really integer number)
+
* string - pointer to a string (strings are stored in special memory zones - constant strings, temp strings, zoned strings).
+
* function - funtion pointer
+
  
Depending of engine build, strings could be from 1024(game build) to 16384 (developer build) characters long. Max entities is also 2048 in game build and 128k in development build.
+
* Game entity (exists on server)
 +
* Client entity (exist on a client)
 +
* Menu entity (exists in menu program which is a separated from a client because client program get unloaded when level changes)
  
When game is saved engine writes all entity keys except ones prefixed with ''_''. This fields are meant to be runtime-only.
+
Theres is also special entity types managed by Darkplaces Engine:
  
Example of entity fields:
+
* Network Entity - legacy networking (not using client side progs)
origin - position or entity in the world space
+
* Render Entity - a Network/Client entity that is sent to render.
health - health of monster/trigger
+
classname - entity class name (a function called after entity get spawned)
+
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
+
  
== Other entities ==
+
[[Category: General Editing Terminology]]
Game entity represents server entity - entity spawned and processed on server programs. There are more entitity types created and processed in other programs:
+
 
+
* 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)
+
* Render entity - entity that is sent to render.
+
 
+
[[Category:Glossary]]
+

Please note that all contributions to Blood Wiki are considered to be released under the Creative Commons Attribution Share Alike (see BloodWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox