Is it possible to implement ECS in C? I only know that it's really a stripped down language. When did C++ become popular in gmaes?
ECS predates C. We used to call it RDBMS :wink:
It's also not commonly used in games, and certainly isn't the only decoupling technique in the world :P
Component based software design practices long pre-date the invention of the term "ecs". One of the most popular component based practices is called OOD :lol:
some kind of wizardry should be used to get the same reusability from C++ (templates, polymorphism, etc).
C++ Interfaces/PIMPL were called ADT's back in C.
Polymorphism can be implemented the same way (via vtables), but polymorphism isn't a good solution to most problems anyway.
Templates were achieved with macros and #includes.
The original version of C++ was actually a code generator for C, and then you fed that C code into a compiler :lol:
I'm trying to write a short summary about how "game programming" was when there were no reusable game engines. Let's assume (and I know it's controversial) that the DOOM engine was the first reusable game engine - so how where games programmed / build before 1993?
Note that while ID software makes a lot of engines (Doom, quake 1, quake 2, quake 3, etc...) they didn't actually reuse them that much themselves.
They didn't even really intend for other people to re-use them -- they accidentally ended up in the engine licensing business when people kept begging to buy their game engine source code...
They analysed the requirements of the game that they wanted to make, and then made that game. Along they way they would create all the tools and "engine" code required for that game... but that was as a byproduct of making a game. They didn't set out with the intention of making reusable engines to sell to everyone.
This still happens today. Most of the games that I've worked on have been on proprietary/custom game engines, not Unreal/Unity/etc... Companies make a game from scratch, and along the way they end up with a lot of generic code that can be reused on their next game. On the next game, they reuse that code, and also write more code that happens to be reusable.