Word of caution about using things found in the internet

My project wasn’t performing as well as I wanted it to work. I spent a week trying to prematurely optimize, switch ECS library, to no avail. Until I decided to write a custom benchmark with all ECS’s, only to find none of them are good enough for me. Then I decided to write “pure” control sample, pretty much the same as BunnyMark. I didn’t have a problem with rendering 8-10k bunnies using BunnyMark, but for some reason my project stuttered just after 1500 objects. After hxscout didn’t yield much help, I compared BunnyMark and my code, just to find this in my project.xml:

<window width="750" height="400" fps="60" hardware="false" vsync="false" antialiasing="4" />

I copied this snippet a long time ago, without thinking twice about it. But hardware="false" made all the difference! So, there’s that: never copy stuff blindly and expect it to work flawelessly.

1 Like

So finally did you switch back to an ECS again?

Currently testing ECX vs Edge. https://github.com/Misiur/ECSStressTest - requires git versions of edge and ecx respectively (for archive reference: ECX, Edge). So far ECX doesn’t stutter at 4K tiles, edge drops FPS significantly.

1 Like

Was this also why your javascript was faster than your C++?

I’m guessing 4k is with Javascript as well, still seems pretty low.

I ramped up to 8k tiles: JS at stable 60FPS, Cpp 45FPS? That is weird. When I hook up hxscout to Cpp build I can’t really debug framerate as just becuase of telemetry it drops to 10FPS.

if code is more understandable after optimization (for you) -> its ok :wink:

Was that your final conclusion then for those of us choosing between ECX and Edge, or did you find any better ECS?

ECX v0.1 practically doesn’t have any overhead and is my final choice - you’re more likely to hit rendering performance bottleneck than an ECS one.

There’s edge2 in development (however in a private reposiotory at the moment) which is way above edge 1 in terms of performance, so all that matters when choosing between ECX and edge2 is the coding style which you prefer.

Alright thanks again for doing the testing, its been very helpful as I doubt I could figure them all out myself.