Rigs-of-rods: Increasing node/beam limit?

Created on 13 Jun 2017  路  3Comments  路  Source: RigsOfRods/rigs-of-rods

I know this has been talked about before, but @fidoj mentioned one of his creations crashes RoR because it goes over the node/beam limit. I increased the node limit to 5000 and the beam limit to 10000 to test. I expected the FPS to decrease and/or memory usage to increase. However, comparing the latest master to a build with the increased limits, the performance is basically identical:
latest master:
ror_2017-06-12_17-48-06
taskmgr_2017-06-12_17-48-24
increased limit:
ror_inbl_2017-06-12_17-49-11
taskmgr_2017-06-12_17-49-24
as you can see, basically identical performance.
To test this yourself, just edit the MAX_NODES and MAX_BEAMS limit in BeamConstants.h:

static const int   MAX_NODES                  = 5000;            //!< maximum number of nodes per truck
static const int   MAX_BEAMS                  = 10000;            //!< maximum number of beams per truck

then download the 20_4_platform.zip file from #1250.
fps/memory usage with the platform (1143 nodes, 5596 beams total):
ror_inbl_2017-06-12_19-51-49
taskmgr_2017-06-12_19-52-00
So, would it be possible to increase these limits for the next release?

needs discussion

Most helpful comment

Actually, there's no need to have any sort of limits anymore. They were necessary before 0.4.5 where truckfile parsing+spawning happened on-the-fly and RoR didn't know the amount of nodes/beams until the vehicle was complete. Current RoR parses first and spawns later, so we know everything and we can simply dynamically allocate exactly the amount of memory we need.

I'll create a test branch for you to build and evaluate.

All 3 comments

wow comparing these creations directly really shows how much of a impact flexibodies adds. comparing these 2 vehicles is akin to comparing a civic to the space shuttle.

definetly YES 馃棥

Actually, there's no need to have any sort of limits anymore. They were necessary before 0.4.5 where truckfile parsing+spawning happened on-the-fly and RoR didn't know the amount of nodes/beams until the vehicle was complete. Current RoR parses first and spawns later, so we know everything and we can simply dynamically allocate exactly the amount of memory we need.

I'll create a test branch for you to build and evaluate.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KinG-InFeT picture KinG-InFeT  路  3Comments

ghost picture ghost  路  7Comments

DirtGamer301 picture DirtGamer301  路  4Comments

tgp1994 picture tgp1994  路  4Comments

only-a-ptr picture only-a-ptr  路  11Comments