Classic Elite entity states

From Elite Wiki
Revision as of 04:44, 13 June 2016 by DrBeeb (talk | contribs)

Upon launching from the Space Station the player is confronted by several entities, the planet ahead, the space station behind, and perhaps additional ships. The following description of each entity's state is specific to the BBC Disk Classic version of Elite, with some variations in the the other 8-bit versions.

Each entity has a state represented in 37 bytes. The first 9 bytes are the (x,y,z) coordinates to 23bit precision with the player at the origin. The next 18 bytes store a 9-member rotation matrix, with the positive unit vector scaled to 0x6000. A pointer of 2 bytes points to a heap that contains processed vertex data for display.

Single bytes represent the entity's speed, acceleration, remaining energy, and counters for roll and pitch actions currently underway.

The remaining 3 bytes represent the entity's A.I., which we shall refer to as the Visible, Attack, and Behavior States. Some bits serve more than one purpose if they are set.

Bit Visible State
7 Kill entity with dust explosion
6 Entity is firing laser at player, or entity is exploding.
5 Display nodes of wire-frame or explosion, not a far-away dot.
4 Keep visible on scanner
3 Recent rendering to screen needs to be erased (draw with EOR operation again)
2,1,0 Number of missiles or thargons remaining, maximum is 7.
Bit Attack State
7 A.I. is active, use tactics. Missiles' trajectory updated 8 times more often than others.
6 Missile's target is player, or entity is more than mildly aggressive.
5,4,3,2,1 I.D. of Missile's target (only bit1 set is Space station or Sun), or refinement to level of aggression.
0 Entity has an E.C.M.