How ECS began I know SQL existed before that, but in 1992 LookingGlass people applied the ideas to video games, spreading object across independent tables, which reduced the convolution, allowing them to produce complex video games, under the 16bit memory constraints.
Interesting that open source people who re-implemented the LookingGlass engine in Unity carefully ignored the original architecture, joining separate tables into a classic God object, doing `switch (ObjectClass)` in one huge routine:
https://github.com/hankmorgan/UnderworldExporter/releases/tag/V1.09Such is the power of Uncle Bob's indoctrination!
They begin by introducing a core system, which allows linking and activating any object, and then listing additional tables, indexable by ObjID. That is very different from the modern vtable approach used by C++/C# game engines.
https://raw.githubusercontent.com/NightDive-Studio/shockmac/master/ShockMac/Game%20Src/Headers/OBJAPP.Hhttps://raw.githubusercontent.com/NightDive-Studio/shockmac/master/ShockMac/Game%20Src/Headers/OBJECTS.H
typedef short ObjID;
#define OBJ_NULL 0 // null object
typedef short ObjRefID;
#define OBJ_REF_NULL 0
typedef short ObjSpecID;
#define OBJ_SPEC_NULL 0
// The common data for all objects
typedef struct Obj {
bool active; // does this object really exist?
ObjClass obclass; // what class this is
ObjSubClass subclass; // subclass within that class
ObjSpecID specID; // ID within that class
union {
ObjRefID ref; // what refers to this
ObjID headused;
};
union {
ObjID next; // next Obj in free chain or used chain
ObjID headfree;
};
ObjID prev; // prev Obj in used chain
ObjLoc loc; // location
ObjInfo info; // extra, application-specific information
} Obj;
#define NUM_OBJECTS 872
#define NUM_OBJECTS_GUN 16
#define NUM_OBJECTS_AMMO 32
#define NUM_OBJECTS_PHYSICS 32
#define NUM_OBJECTS_GRENADE 32
#define NUM_OBJECTS_DRUG 32
#define NUM_OBJECTS_HARDWARE 8
#define NUM_OBJECTS_SOFTWARE 16
#define NUM_OBJECTS_BIGSTUFF 176
#define NUM_OBJECTS_SMALLSTUFF 128
#define NUM_OBJECTS_FIXTURE 64
#define NUM_OBJECTS_DOOR 64
#define NUM_OBJECTS_ANIMATING 32
#define NUM_OBJECTS_TRAP 160
#define NUM_OBJECTS_CONTAINER 64
#define NUM_OBJECTS_CRITTER 64
Current Mood: amusedCurrent Music: Aquarium of Alkonos