Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет nancygold ([info]nancygold)
@ 2024-05-09 21:04:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Настроение: amused
Музыка:Aquarium of Alkonos
Entry tags:computing

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.09
Such 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.H
https://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


(Добавить комментарий)


(Анонимно)
2024-05-09 23:13 (ссылка)
'convolution' in a technical context can have several meanings and none of them is 'complexity'. Even 'convolutedness' is a word, allegedly, and it would be better in this case.

(Ответить) (Ветвь дискуссии)


[info]nancygold
2024-05-10 01:39 (ссылка)
Convoluted usually means two or more unrelated things mixed together.

(Ответить) (Уровень выше)


[info]aryk38
2024-05-09 23:28 (ссылка)
наследование? полиморфизм? ууу.

причом тут SQL

(Ответить) (Ветвь дискуссии)


[info]nancygold
2024-05-10 01:48 (ссылка)
As soon as you try making objects efficient and/or flexible you re-invent SQL.

(Ответить) (Уровень выше)


(Анонимно)
2024-05-09 23:36 (ссылка)
#define CRAZY_PIDOR TRUE
#define NIKITA_ZADKOV CRAZY_PIDOR

(Ответить)


[info]helga99
2024-05-13 11:32 (ссылка)
Drift Hunters is the perfect mix of simulation and arcade. You get realistic car physics, but the gameplay is accessible and fun.

(Ответить)