Why Entity Component system?

At DAE we put a huge focus on object-oriented programming. It's what I've gotten to know and am used to, and what I'm comfortable with.
While asking veterans of the industry about interesting topics and themes, Data-oriented programming was the one I found myself struggling with the most.

This page is more of a personal blogpost about my journey and why I'm delving into the topic of ECS. The most important points I've learned are:
1. Focus on 1 thing at a time, I took too much on my plate trying to combine learning a new engine, with a style of programming I hadn't done before AND tried to build it up through test-driven-development.
It's good to be curious, but its better to accept limits and to not let the quantity of what you learn influence the quantity of what you learn.
2. How is ECS used, what are its core benefits.
3. What do I want to do with ECS to further explore it.

I've got a need... a need to cache

In class I ran into a certain insecurity. It's hard to admit but while learning about caching, I understand the theory but had no idea how to apply it.
It's awesome that Data is close but how does it get close? Do I put it close? Does it literally start from Compile-time order and can I then control it dynamically?
It got me unsure about myself and It's a topic I regretfully avoided for a few months. The fellow students that have already done engineering degrees spoke about it so casually, but nobody goes into applications of caching.
I'm a person that loves exploring and finding out about new things, so the idea of caching was like a mini-boss I wanted to beat in my rpg of life.
Talking to some industry veterans and doing my research the topic that piqued my interest the most was ECS, hence giving me my first reason to do a project about it.

Data oriented programming... goes against intuition:

I come from a background of Occupational Therapy and have fought hard to build up and polish my programming skills.
I was lucky enough to be able to do this through DAE, but this has burned object oriented programming into my brain.
Any problem I have I solve through an object oriented mindset of abstracting and changing the objects themselves as its the only thing I've been doing for the last few years.
Finding out about ECS, and seperating functionality from entities to this degree immediately peaked my interest!
I looked at more sources for software architecture and the benefits. They were almost unending!
As learned by my previous projects I did get sceptical and want to know the downsides. (shoutout Bob Nystrom);
Wanting to break out of my object oriented cage I my mind fully on the topic of ECS, I decided to work on my first ECS based project: Project Spellsprout.

Fiddling, exploration, and putting too much on my plate

The engines

Firstly I looked at some engines that (can) apply ECS.
The main ones I found found were:
- Unity (ECS) - Unreal (Mass -> using "fragments" and "processors")
- EnTT (git)
- Bevy (website)

Experimenting

To get to know ECS I chose Bevy and Unreal to start with.
As far as I can find Unity has the best known ECS system between Unity and Unreal, so I chose to go with Unreal as I love working with the blueprinting/CPP combination and want to gain experience there too.
Bevy was a choice to go more into the unknown and I've always wanted to fiddle around with Rust.

The Unreal documentation was quite hard to find as normal Unreal already has a rough time with documenting everything, and I expected an extention to the mass plugin to not have a lot written about it.
I made a recreation of an official unreal Mass tutorial.
My main findings were for it be hard to understand their specific terms. It seems that they're not allowed to use the normal ECS terms and changed some to "fragment" and "processor".
The adding of requirements and shared requirements was however very intuitive. Querying was nice, as were tags. Fragments and processors were hard to use without looking at examples.

To use Bevy I first went through a tutorial of the rust book.
It was hugely interesting to learn this programming language as I've heard a lot of pro- and con rust talk.
Cargo seems like neverland magic coming from the maze that was learning to link and compile in Visual studio C++.

Icarus flew too close to the sun

Here comes my biggest lesson of this project, and something I will take with me for life.
My PC had been broken for a good while with repairs being hundreds of euros, but with being able to use my partners PC I've finally been able to start programming again!

I come from a background that's not very programming related and this has brought with it a certain amount of insecurities.
Starting work again and Unreal and Rust going so smoothly I got my confidence back and planned out my project and wanted to work through the methodology of test-driven-development (mainly through Bob Martins talks and posts)!
1. make pseudo code for the core components and systems I want, 2. set up Unit-Tests to start the TDD cycle, 3. make an awesome game.

Day after day I get much less progress than I would usually expect from any project. I get stuck working through unit testing, and working out how to add the relevant features to Bevy.
I knew completely how I wanted my game to look like, and mostly how the structure of my ECS would look like. I ask people with ECS experience for feedback on my structure and pseudo-code and improve on it, but am still stuck in the TDD steps, while fighting Bevy to get stuff working.

After a few days of these struggles I realise my mistakes and needing to pull back. I get overloaded cognitively and am losing confidence. The hardest part is admitting that I know what to do if I had just picked Unreal, but wanting to go for a engine in a scope much too big AND with a new methodology... was a mistake
note down my findings for some introspective thinking and decide to make this page and rethink how to continue.
My game (farming plants to use them for a survivors like defence game) doesn't necessarily need ECS and I might be forcing it. I know how to apply ECS, but not through Bevy and adding TDD is overloading me with new things.

What do I do?

I've felt what it is to fly too close to the sun, but don't want to give up ECS. I scrapped project spellsprout, holding it for a non-learning hobby project, and decide on what's next.
Luckily I get to do a bachelor project about a topic of my own choice. I've looked at problems ECS already fixes and interesting spots where it could be applied.
I am now doing literature study to see the benefits of ECS particularly on simulations, and would like to have a better grasp on its benefits by applying it to a project.

For the semester of september-february I will be applying ECS to Cellular-Automata[CA], as I'm curious to see the benefits of having CA implemented in a new way.