Organisation of the source code

I recently watched a tutorial about the unity engine and was fascinated by the simple way of dealing with the objects. Every element in the scene is treated the same and gets its individual functionality by attaching components.

Here I have created a small example where a box is subjected to gravitation and can be steered to the left or right using the a and d keys. The user input is centralised. Objects that are to react to keyboard input simply access this central location.

So simple. I’m thrilled. :slight_smile:

PS: Here is the tutorial (german) I was inspired.


I’ve made a few ECS implementations myself, just for the fun of it, as I’ve failed to see the true benefits in my small projects. I’ve thought about rewriting some of my small projects to use the ECS pattern, but haven’t really come around to it yet. If you are Really interested in this sort of thing, I’ll recommend taking a look at BitECS and Wolf-ECS, the two fastest Javascript implementations with active developers.

The Web-ECS discord is invaluable, as they discuss a variety of optimizations and implementation methods to achieve lightning-fast inserts, deletes and queries:


Thank you for pointing out ECS (Entity component system - Wikipedia). You never stop learning! :slight_smile:

And Thank you for the invidation but I don’t have any free capacity to join any more groups or discussions. At my age, I have to make sure i don’t get too distracted. :wink:


The link, unfortunately, has run out. Can you drop it one more time?