bWWd said:
bWWd,
Before I say anything, I want to iterate the first rule of optimizing, benchmark. Basically, it means no matter how logical it might seem looking at code, you never know if an optimization will work until you test it. There's no "benchmark" tool for OpenBOR modules, so real world testing is your only option.
Logically, reducing the number of entities will reduce the engine's load, and here's why:
Whenever there is a platform or wall on in the level, the engine is always checking against it. The computer can't think like a human and go -
"oh, well that player is on the other side of the room, I don't need to run calculations to see if he's touching this wall/platform." There are some complex algorithms you can add to try and do that, but they have their own problems and that's another discussion. Worse, OpenBOR uses floating points for its platforms and walls. You'll note
Roel pointed out he avoids them in his platform games. Floating points are expensive (but they are needed for precision since OpenBOR is a 3D world).
In short, walls and platforms are expensive. But, here's the upside - it's a fixed expense per object. Unless you you get into ridiculous number ranges, it doesn't matter if a size is 500 or 5000. The formula is the same and you won't notice any difference.
On the other hand, every time you put an object on in play, OpenBOR has to add it to some check loop. More entities - more iterations. More platforms, moar iterations. In the case of walls and platforms, each being a fixed expense.
IOW, yes, you should be better off with fewer, larger, walls and entities than tons of smaller ones. I would also prefer walls over platforms when possible, because no matter how much you optimize them, platform entities still have a lot of unused logic running. But back to the first statement - just because it makes logical sense doesn't mean that's what will happen. I know it could be work for nothing, but my suggestion is rebuild with larger objects, and test it vs. the old one to be sure.
If that STILL doesn't work, I once experimented with a scripted concept that spawned and destroyed fixed entities as needed to keep them out of play when they weren't on screen. The script itself was fairly expensive, but it was a big net gain overall compared to leaving everything in play at once. I ended up scrapping it because for me it was just unnecessary complexity, but it could be something to think about for you.
DC