clabra / opennero

Automatically exported from code.google.com/p/opennero
Other
0 stars 0 forks source link

frame rate is slow for large number of agents #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start OpenNERO 
2. Load a mod with more than 20 agents on the field (such as Roomba or NERO)
3. Record the frame rate

What is the expected output? What do you see instead?

We would like to keep the frame rate above the 24 FPS range. Instead, on many 
machines the rate drops to around 10.

The frame rate improves dramatically from the Debug build to the Release build. 
However, in NERO and Roomba environments, the sensor calculations are not 
efficient and in Roomba in particular are always done every frame for every 
agent, which leads to large frame delays.

Several possible solutions:
 * Split agent evaluations between frames
 * Make sensor and other calculations more efficient, in particular in Roomba
 * Decrease the complexity of the level geometry and the collision detection system

Original issue reported on code.google.com by ikarpov on 18 Jul 2010 at 7:46

GoogleCodeExporter commented 9 years ago
Another thought: text output can slow things down as well

Original comment by ikarpov on 21 Jul 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Changed frame rate counter to be more stable and easier to read (whole number)

Original comment by ikarpov on 24 Aug 2010 at 7:11

GoogleCodeExporter commented 9 years ago
Frame rate on Roomba should be faster now - the code uses a KD-tree structure 
to store bread crumbs and find the nearest one.

Original comment by ikarpov on 12 Sep 2010 at 10:43

GoogleCodeExporter commented 9 years ago
Regarding the output, it does not seem to slow down the code (at least on 
Linux) but it can be annoying. In particular, the AI summary output should 
really only go into file logs or possibly into an external plot UI. The UI 
already exists but should be started from within the code like the external GUI 
for NERO.

Original comment by ikarpov on 12 Sep 2010 at 10:46

GoogleCodeExporter commented 9 years ago
This is fine for now

Original comment by ikarpov on 15 Sep 2010 at 3:44