[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1751968917504602.png (42 KB, 218x221)
42 KB
42 KB PNG
ECS is also shit.

OOP has been used for over half a century and remains the most popular professional programming paradigm in 95+% of usecases.
>>
>>106904649
The anti-OOP talk is just parroted by rust zealots who don't even understand what they're talking about it.
>>
>>106904649
totally agree saaar!!!! OP is #1 in our Apple/MS/Oracle workgroups

please redeem!!!!!
>>
>>106904771
>OOP bad because some people are bad at utilizing it
Wow, you sure showed him.
>>
>>106904812
as opposed to
>OOP good because there is an endless sea of indian code monkeys using it
>>
>>106904649
A better question is, why is ECS so new?
I know it's unintuitive at first, but when you work with it once, it becomes so obvious that most concepts should be abstracted as E, C and S.
>>
unpopular opinion but i find ecs code much more elegant than even the cleanest written oop slop
>>
File: based_dept.gif (794 KB, 500x446)
794 KB
794 KB GIF
>>106904649
Skill issue.
>>
>>106904649
>OOP has been used for over half a century
The programs we have been using in that time have been examples of increasingly high quality.
>>
>>106904877
>>106904649
ECS is something you can roll in a couple hours in any language that supports OOP features, how is it an OOP alternative?
>>
File: cpp.png (202 KB, 538x565)
202 KB
202 KB PNG
The most watched video on cppcon youtube is Mike telling them their bloat sucks KISS. lmao
>>
>>106905684
actual 90 iq nodev detected
>>
>>106904835
Nobody made that argument and it doesn't make any sense anyway.
>>
>>106904812
and data oriented design is bad because?
>>
>>106905700
Mike Acton's talk isn't "use ECS".
It's understand your problem and solve it. Model your program around the actual data it's processing, not what seems nice to you.
>>
reminder that idiots who make these threads are jeets and trailer trash who got a "CS degree" at a state college and dont want to lose their Java/C#/C++ job to someone who has an IQ higher than their room temperature IQ

the level of intelligence that it takes to learn OO is the same as javascript, probably less as javascript has a very advanced and cleverly designed kind of OO that allows objects to be created without classes and use functions in a high order way. OO in C++ is pure streetshitter kindergarten level bullshit of just connecting C structs with functions and anyone who brags about it is the lowest form of idiot you will ever find in the IT field
>>
>>106904771
Hush, Chang. The humans are talking.
>>
>>106906886
that's a lot of words to say "I got filtered by OOP"
>>
File: about-us.png (1.15 MB, 1000x750)
1.15 MB
1.15 MB PNG
>>106906939
oh no!!!! I have been filtered by the saars

why am I not worthy to do the needful!!!!!
>>
>>106905684
I don't think it's an alternative, but a sub style of. After looking it over it just looks like OOP principles but done a very specific way, outside of the typical "design patterns" OOP programmers are more familiar with.
>>106905740
>the super useful IQ insulter that offers no insight or rebute
>>
>>106904649
A single month spent working with "industry professionals" should be enough to convince anyone with a 3+ digit IQs that all software "best practices" are a meme.
>>
>>106906939
OOP is a filter. Just not in the way you think it is.
>>
>>106907090
thank you saar for your deep wisdom! you have done the needful!
>>
>>106907116
Speak Christian.
>>
>>106907080
>Data oriented design is actually a sub style of OOP
Is this the new cope?
>>
>everything is OOP
yawn
>>
>>106907379
this but unironically
>>
oop more like poop
>>
>>106908232
then no one cares
>>
File: 1760379496386971.png (35 KB, 647x361)
35 KB
35 KB PNG
>>106908240
just say it in frog
>>
>>106904649
oop is slow shit that goes against what the CPU wants which is bulk processing

https://www.youtube.com/watch?v=UGLnBD-AEbA
>>
>>106907268
Looking at ECS, its focus is on the entities being composed of components. An entity is an object, and components are a variety of different structures and data types that an entity can possess. This is basically describing OOP but being used in a specific way with a specific goal that centers around entities, where as typically OOP people will focus on different design patterns or maybe domain driven design types will focus on their own way of chopping things up. Ultimately it's all OOP just some 'sub style' of OOP with different guiding principles.
>>
>>106909297
this is your brain on curry and poop
>>
>>106909297
you're talking like you're literally googling arguments and selectively reading and picking shit to make a made up point
actually read the ecs wikipedia article in full if you want to stop embarrassing yourself
>>
>>106904649
Everything beyond basic procedural programming has been a waste of time.
>>
File: 1705936122727104.png (7 KB, 317x159)
7 KB
7 KB PNG
>>106909406
letting shitskins into the industry was the mistake
>>
>>106904877
Seems very intuitive when dealing with games though.
>>
File: 1732204774170941.png (474 KB, 500x800)
474 KB
474 KB PNG
My immediate reaction when seeing DoD and ECS was - that's just in-memory relational database.
If you ever had a intro database class and learned about normalization, data modelling in tables, and relations using unique keys (IDs), and learned the most common data structures and algorithms used for databases; then it's all very intuitive and a lot of makes sense.

And also nothing new, have been used for half century, as long as OOP.
The performance characteristics of modern computers and how can you structure your data and programs to fully utilize it is also interesting.

But most of it only really applies game programming where you have massive number of entities, and plenty of systems and components used on more than one entity, and tons of components mixed in many variations; and very obvious and ever-present performance deadline - single frame. And especially for game engines where you don't really have a control or information about the actual game and can't hardcode and streamline for it.
>>
>>106909262
now show the difference in something other than a pure number-crunching benchmark with no branching in its logic
>>
>>106904649
Gooooooood morning saar
>>
>>106909362
I have read it. I just now re-read it.
So is my understanding correct that the entity is not 'decorated' with components, in the sense a class would inherit a specific base class or set of base classes, but rather it just points to an instance of each component? Kind of how >>106910051 calls it a relational database?
Initially when I read it, it seemed like the entity is usually an ID with a type, and then it has components which can be classes, structs or arrays so I imagined it as 'decorated' but after a reread my initial interpretation may have been off. Would love some actual constructive discussion vs "fuck you retard curry nigger"
>>
>>106904649
>OOP has been used for over half a century and remains the most popular professional programming paradigm in 95+% of usecases.
source?
>>
File: 1757365342911071.jpg (2.46 MB, 2706x2659)
2.46 MB
2.46 MB JPG
>>106910629
Yeah, its not that the entity itself receives or implements behavior. It is just a binding agent between instances. But if you look at the entity as a whole surface area of all its components, you could think of the overall thing as having these multiple decorators [spoiler]i dont know what a decorator is[/spoiler]
>>
>>106910685
maybe binding agent between instances is not a good description. I like the "keyring" concept where it collects different components into one collection or association.
>>
>>106904649
>software industry at its lowest quality its ever been
>OOP remains the most popular professional programming paradigm in 95+% of usecases.
I see
>>
File: 1738821667743644.jpg (142 KB, 848x619)
142 KB
142 KB JPG
>>106910629
The least intuitive thing about this imho is the decouple of component and system. Ideally systems only work on some subset of components and not on all component, that's reasonable. But you often get a systems that only work on single component, and that just makes the split feel redundant.
Another thing that feels redundant is that you often get a components with single or countable(=small finite and fixed number of) instances.
You can hack a lot of things without a full block ECS with such aggressive decoupling.
It's why lots of people just pass on it and use only some apects of it.

One thing I have to critique about every anti-OOP pro-DoD video is that they take some geometry-related example, and showcase how array of virtual pointers to data with getters and setters is slower than flat array of datas. It's obvious, boring, and often with only 2x performance boost.
What they forget to show but should is that if you have some fat base class, then ALL parts of your program starts slowing down when your base class starts getting larger due to increasingly worse memory locality.
The decoupling of entities to their own data structure (aka SoA = structure of arrays) keeps the performance characteristics under control when your number of components grow (in contrast to very fat base class).
Again if you don't buy to full block ECS, you can have common base class but not too big, and put very sparse components into their own data structure (usually hashmap for the sparse ones).
>>
>>106910629
>So is my understanding correct that the entity is not 'decorated' with components, in the sense a class would inherit a specific base class or set of base classes, but rather it just points to an instance of each component?
Entities can't point to anything because they're just IDs.
A "world" class keeps all entities and points to their components for coherency.

The components are stored in a "storage", so for example, we have HealthStorage that stores all Health components.
We can easily represent the component with a dictionary, where the key is the ID and the value is health points, e.g.
{1: 100.0, 2: 84.0, 5: 12.5}
This is easier to reason with, but ideally you're supposed to use a data structure that is tightly packed, so a sized array [100.0, 84.0, 5.2] with perhaps a matching helper array that tells you which entry belongs to which entity id.
The advantage here, as opposed to moving through pointers, is that when you're iterating over all values you can read them very quickly from contigious memory.
A HealthRegenerationSystem does not need to know who owns the Health component, all it has to do is look at one array, transform every value, and it's already done.
Other systems may want to know whether a specific entity has a component, at which point you can just query "world", instead.

>>106911059
>But you often get a systems that only work on single component, and that just makes the split feel redundant.
If you feel that way, then your components are probably not atomized enough.
For example, I can have a component "Plant" and a component "PlantGrowth". I could easily combine them, since all plants are supposed to grow, but this way I can also remove the component entirely when a plant is fully grown to avoid querying over them.
I now also know that a plant without a PlantGrowth component is probably a fully grown plant.
>>
>>106911382
>If you feel that way, then your components are probably not atomized enough.
it's usually the player-oriented components - camera, controls, UI stuff
>>
>>106909297
>An entity is an object
it isn't, its an array index
>>
>>106911382
all this feels like it's a whole level of abstraction lower than OOP, which could have both an entity interface and an object interface
>>
>>106905740
ECS is implemented using OOP. They're not comparable things at all.
>>
>>106911382
>a dictionary
and pray tell, what is a dictionary?
>>
>>106911936
it's not, it's just lowcode gamedev retards having their mind blown by a special case of dependency injection
>>
File: java means durgasoft.jpg (228 KB, 1280x720)
228 KB
228 KB JPG
>>106904649
>OOP has been used for over half a century and remains the most popular professional programming paradigm in 95+% of usecases.
Spoken like a true DURGA graduate. I can smell your garam masala from here.
>>
>>106913837
Professor Babu can code better than 99% of madachods on /g/
>>
>>106911936
>all of this could have been OOP!
See, this is why no one wants to talk to you. You always manage to say the most uninformed nodev shit.
Yes, you can model everything with anything, but ECS provides unique benefits from pure OOP paradigm.
>>
>>106915694
REDEEM SAAR!1
>>
>>106915920
>you said something i don't agree with so i'm not going to talk to you at all (except announcing not talking to you)
>strawman
it's like i'm reading a leftist comment on some clickbait political article
>>
>>106905825
OP made this argument and his argument makes no sense because of it.
>>
>>106904649
True enlightenment is when you understand that OOP is just functional programming under the hood



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.