>>14424926>outs himself as a retardECS is literally advertised as an alternative to OOP for game development you double nigger.
As for your shitty exercise, you are once again displaying your stupidity
>DUDE LIKE ON THE HECKIN' NETWORK LEVEL EVERYTHING IS JUST BYTES SO OBJECTS DON'T HECKIN' EXIST THEREFORE OOP... LE BADhow can you be so fucking retarded? are you 16? the whole point is to encapsulate state
here's your fucking solution, fill in the blanks if you aren't a street shitting indian
[Server]
myLocalCopyOfTheSimulation.Update()
particles = myLocalCopyOfTheSimulation.SelectFiveParticles()
myLocalCopyOfTheSimulation.DoTheThing(particles)
Send(particles)
[Client]
Recieve(particles)
myLocalCopyOfTheSimulation.Update()
myLocalCopyOfTheSimulation.DoTheThing(particles)
myLocalCopyOfTheSimulation.Print()
>>14424953The most low-level way of doing the 1st example would be to use a bitmap for each entity but you're limited to like 64 components which may be too much or not enough depending on who you're asking because, again, ECS isn't standardized.
>high level explanation, but I'm not going to show you how to implement itEven when you find an example implementation, it's so riddled with C++ garbage code that it's unreadable. My best advice is doing it in C and then doing the same thing in C++ i.e. avoiding templates and polymorphism as much as you can. But to each their own.
The 2nd way is much more realistic for larger projects and I learnt it from some blogpost on the gamedev forums. Can't find it now but it's a really good read.
I'm not familiar with how Unity does it but there seems to be plenty of boilerplate which can't be good.